Improvements to the preferences screen
This commit is contained in:
parent
13d1534042
commit
a86e3ed4a8
3 changed files with 32 additions and 4 deletions
|
@ -12,4 +12,17 @@ class SecurityHelper {
|
|||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public static function verifyAjaxCSRFToken($observedToken) {
|
||||
$current_namespace = new Zend_Session_Namespace('csrf_namespace');
|
||||
$observed_csrf_token = $observedToken;
|
||||
$expected_csrf_token = $current_namespace->authtoken;
|
||||
|
||||
if ($observed_csrf_token == $expected_csrf_token){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue