diff --git a/webapp/src/main/webapp/WEB-INF/csrfguard.js b/webapp/src/main/webapp/WEB-INF/csrfguard.js index 3cc19637508..263b70d2d4b 100644 --- a/webapp/src/main/webapp/WEB-INF/csrfguard.js +++ b/webapp/src/main/webapp/WEB-INF/csrfguard.js @@ -373,7 +373,7 @@ if (owaspCSRFGuardScriptHasLoaded !== true) { hidden.setAttribute('name', tokenName); hidden.setAttribute('value', value); - form.appendChild(hidden); + form.insertBefore(hidden, form.firstChild); //console.debug('Hidden input element [', hidden, '] was added to the form: ', form); } else { hiddenTokenFields.forEach(function (i) {