Add missing URI component encoding on login

pull/283/head^2
Flashfyre 2024-04-24 21:21:28 -04:00
parent e00ebb49ca
commit 269db12436
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
};
if (!this.inputs[0].text)
return onFail(i18next.t('menu:emptyUsername'));
Utils.apiPost(`account/login`, `username=${this.inputs[0].text}&password=${this.inputs[1].text}`, 'application/x-www-form-urlencoded')
Utils.apiPost(`account/login`, `username=${encodeURIComponent(this.inputs[0].text)}&password=${encodeURIComponent(this.inputs[1].text)}`, 'application/x-www-form-urlencoded')
.then(response => {
if (!response.ok)
return response.text();