From 269db124363a072a2e510bf09d920464d78c511b Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 24 Apr 2024 21:21:28 -0400 Subject: [PATCH] Add missing URI component encoding on login --- src/ui/login-form-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/login-form-ui-handler.ts b/src/ui/login-form-ui-handler.ts index 27de954632f..f77efcad260 100644 --- a/src/ui/login-form-ui-handler.ts +++ b/src/ui/login-form-ui-handler.ts @@ -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();