aboutsummaryrefslogtreecommitdiff
path: root/src/main/assets/scripts.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-24 01:09:32 +0300
committerGravatar Vitaly Takmazov2022-11-25 14:16:03 +0300
commit9faf43a6c4b933b5f97be4348d461bf91f5bf2e2 (patch)
tree238968b200c73d905b9367154fddb7ac3eff6274 /src/main/assets/scripts.js
parente0a98e8bd925bc5aebe49d011bb4ec17978f8bd9 (diff)
Spring Boot 3
Diffstat (limited to 'src/main/assets/scripts.js')
-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"/>