Sanitize cleanCallback on wakeup. Extra security check for APIs like SecurePoll/auth-api.php.
This commit is contained in:
parent
a250e5de46
commit
cd367dabbd
1 changed files with 7 additions and 0 deletions
|
|
@ -84,6 +84,13 @@ class Status {
|
|||
$this->ok = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize the callback parameter on wakeup, to avoid arbitrary execution.
|
||||
*/
|
||||
function __wakeup() {
|
||||
$this->cleanCallback = false;
|
||||
}
|
||||
|
||||
protected function cleanParams( $params ) {
|
||||
if ( !$this->cleanCallback ) {
|
||||
return $params;
|
||||
|
|
|
|||
Loading…
Reference in a new issue