We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9a9add commit 90057c2Copy full SHA for 90057c2
symfony/stimulus-bundle/2.20/assets/controllers/csrf_protection_controller.js
@@ -33,8 +33,8 @@ export function generateCsrfToken (formElement) {
33
if (!csrfCookie && nameCheck.test(csrfToken)) {
34
csrfField.setAttribute('data-csrf-protection-cookie-value', csrfCookie = csrfToken);
35
csrfField.defaultValue = csrfToken = btoa(String.fromCharCode.apply(null, (window.crypto || window.msCrypto).getRandomValues(new Uint8Array(18))));
36
- csrfField.dispatchEvent(new Event('change', { bubbles: true }));
37
}
+ csrfField.dispatchEvent(new Event('change', { bubbles: true }));
38
39
if (csrfCookie && tokenCheck.test(csrfToken)) {
40
const cookie = csrfCookie + '_' + csrfToken + '=' + csrfCookie + '; path=/; samesite=strict';
0 commit comments