Validate action parameter
Make sure the action request parameter only consists of a-z, A-Z, 0-9, _ or - to discourage tampering with the following require_once. darcs-hash:20080704194114-2b4f5-2bec30d7d40d7c7bd2c747ef3c805dbf720f6159.gz
This commit is contained in:
parent
017bbd3b0f
commit
e3e047b24a
@ -24,7 +24,7 @@ require_once(INSTALLDIR . "/lib/common.php");
|
|||||||
|
|
||||||
$action = $_REQUEST['action'];
|
$action = $_REQUEST['action'];
|
||||||
|
|
||||||
if (!$action) {
|
if (!$action || !preg_match('/^[a-zA-Z0-9_-]*$/', $action)) {
|
||||||
common_redirect(common_local_url('public'));
|
common_redirect(common_local_url('public'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user