Skip to content

Commit a72b8b5

Browse files
author
Till Brehm
committed
Added check for content of redirect variable.
1 parent 3b09eb9 commit a72b8b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

interface/web/capp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
}
4444

4545
if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.');
46+
if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,5}$/i", $redirect)) die('redirect contains unallowed chars.');
4647

4748
//* Check if user may use the module.
4849
$user_modules = explode(",", $_SESSION["s"]["user"]["modules"]);

0 commit comments

Comments
 (0)