Fixes #1634: Use masked CSRF tokens to prevent BREACH exploits

This commit is contained in:
Qiang Xue
2013-12-26 17:51:14 -05:00
parent 2686403c0e
commit c8960168c5
4 changed files with 60 additions and 3 deletions

View File

@ -241,7 +241,7 @@ class BaseHtml
$method = 'post';
}
if ($request->enableCsrfValidation && !strcasecmp($method, 'post')) {
$hiddenInputs[] = static::hiddenInput($request->csrfVar, $request->getCsrfToken());
$hiddenInputs[] = static::hiddenInput($request->csrfVar, $request->getMaskedCsrfToken());
}
}