aboutsummaryrefslogtreecommitdiff
path: root/src/main/assets
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/assets')
-rw-r--r--src/main/assets/scripts.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/assets/scripts.js b/src/main/assets/scripts.js
index b103810d..cc811808 100644
--- a/src/main/assets/scripts.js
+++ b/src/main/assets/scripts.js
@@ -417,6 +417,7 @@ function checkUsername() {
/******************************************************************************/
function openDialogLogin() {
+ const token = document.body.getAttribute('data-token');
let html = `
<div class="dialoglogin">
<p>${i18n('loginDialog.pleaseIntroduceYourself')}:</p>
@@ -426,6 +427,7 @@ function openDialogLogin() {
<a href="/_apple" id="signapple"><img src="https://appleid.cdn-apple.com/appleid/button"></a>
<p>${i18n('loginDialog.registeredAlready')}</p>
<form action="/login" method="POST">
+ <input type="hidden" name="_csrf" value="${token}" />
<input class="signinput" type="text" name="username" placeholder="${i18n('loginDialog.username')}" autocomplete="username" /><br/>
<input class="signinput" type="password" name="password" placeholder="${i18n('loginDialog.password')}" autocomplete="current-password" /><br/>
<input class="signsubmit Button" type="submit" value="OK"/>