Improvements to the preferences screen

This commit is contained in:
Albert Santoni 2015-09-23 18:21:30 -04:00
parent 13d1534042
commit a86e3ed4a8
3 changed files with 32 additions and 4 deletions

View file

@ -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;
}
}
}