Format code using php-cs-fixer
This commit is contained in:
parent
43d7dc92cd
commit
d52c6184b9
352 changed files with 17473 additions and 17041 deletions
|
@ -1,23 +1,26 @@
|
|||
<?php
|
||||
|
||||
class SecurityHelper {
|
||||
|
||||
public static function htmlescape_recursive(&$arr) {
|
||||
class SecurityHelper
|
||||
{
|
||||
public static function htmlescape_recursive(&$arr)
|
||||
{
|
||||
foreach ($arr as $key => $val) {
|
||||
if (is_array($val)) {
|
||||
self::htmlescape_recursive($arr[$key]);
|
||||
} else if (is_string($val)) {
|
||||
} elseif (is_string($val)) {
|
||||
$arr[$key] = htmlspecialchars($val, ENT_QUOTES);
|
||||
}
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public static function verifyCSRFToken($observedToken) {
|
||||
public static function verifyCSRFToken($observedToken)
|
||||
{
|
||||
$current_namespace = new Zend_Session_Namespace('csrf_namespace');
|
||||
$observed_csrf_token = $observedToken;
|
||||
$expected_csrf_token = $current_namespace->authtoken;
|
||||
|
||||
return ($observed_csrf_token == $expected_csrf_token);
|
||||
return $observed_csrf_token == $expected_csrf_token;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue