mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-24 17:13:01 +00:00
100-run: fix XSS when action is not found
This commit is contained in:
parent
978da55e00
commit
2e1e1d0535
2 changed files with 4 additions and 4 deletions
|
@ -8,6 +8,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
|||
- [security] Fixed an XSS vulnerability in the `format` GET parameter of the `stats` action (thanks, @JamieSlome)
|
||||
- [security] Ensured that the `returnto` GET parameter leads you only to another place on your Pepperminty Wiki instance (thanks, @JamieSlome)
|
||||
- [security] Ensure that Javascript in SVGs never gets executed (it's too challenging to strip it, since it could be lurking in many different places - according to [this answer](https://stackoverflow.com/a/68505306/1460422) even Inkscape doesn't strip all Javascript when asked to)
|
||||
- [security] Fixed XSS when the `action` GET param doesn't match a known action
|
||||
|
||||
|
||||
## v0.23
|
||||
|
|
|
@ -47,11 +47,10 @@ if(!isset($pageindex->{$env->page}) and isset($_GET["search-redirect"]))
|
|||
|
||||
|
||||
// Perform the appropriate action
|
||||
$action_name = $env->action;
|
||||
if(isset($actions->$action_name)) {
|
||||
$req_action_data = $actions->$action_name;
|
||||
if(isset($actions->{$env->action})) {
|
||||
$req_action_data = $actions->{$env->action};
|
||||
$req_action_data();
|
||||
}
|
||||
else {
|
||||
exit(page_renderer::render_main("Error - $settings->sitename", "<p>No action called " . strtolower($_GET["action"]) ." has been registered. Perhaps you are missing a module?</p>"));
|
||||
exit(page_renderer::render_main("Error - $settings->sitename", "<p>No action called $env->action has been registered. Perhaps you are missing a module?</p>"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue