UTF-8 encode Base64 in-transit passwords (fixes #2981, references #2892)

This commit is contained in:
Bernd Bestel 2026-09-02 23:52:31 +02:00
parent 020841117f
commit 0cf4d557af
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@
### General
- xxx
- Fixed that it wasn't possible to log in using passwords containing non-latin characters
### API

View File

@ -13,6 +13,6 @@ $("#login-button").on("click", function (e)
{
e.preventDefault();
$("#password_base64").val(btoa($("#password_input").val()));
$("#password_base64").val(btoa(String.fromCharCode(...new TextEncoder().encode($("#password_input").val()))));
$("#login-form").trigger("submit");
});

View File

@ -46,7 +46,7 @@ $('#save-user-button').on('click', function (e)
jsonData.picture_file_name = RandomString() + CleanFileName($("#user-picture")[0].files[0].name);
}
jsonData.password_base64 = btoa(jsonData.password);
jsonData.password_base64 = btoa(String.fromCharCode(...new TextEncoder().encode(jsonData.password)));
delete jsonData.password;
delete jsonData.password_confirm;
delete jsonData.change_password;