update
This commit is contained in:
@@ -20,7 +20,9 @@ function check($label, $ok) {
|
||||
|
||||
check('cookie httponly enabled', strpos($helper, "'httponly' => true") !== false);
|
||||
check('cookie samesite strict enabled', strpos($helper, "'samesite' => 'Strict'") !== false);
|
||||
check('cookie secure detects HTTPS', strpos($helper, "'secure' => (!empty(\$_SERVER['HTTPS']) && \$_SERVER['HTTPS'] !== 'off')") !== false);
|
||||
$has_secure_detect = (strpos($helper, '\'secure\' => $is_https') !== false && strpos($helper, '$is_https =') !== false)
|
||||
|| strpos($helper, '\'secure\' => (!empty($_SERVER[\'HTTPS\']) && $_SERVER[\'HTTPS\'] !== \'off\')') !== false;
|
||||
check('cookie secure detects HTTPS', $has_secure_detect);
|
||||
|
||||
echo "\n--- {$pass} passed, {$fail} failed ---\n";
|
||||
exit($fail > 0 ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user