diff options
author | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-20 16:02:48 +0000 |
---|---|---|
committer | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-20 16:02:48 +0000 |
commit | fbf1be890ad30cd3a294c969fed3efe61ad59974 (patch) | |
tree | b6b014e98b6f79bd3d9b05aac4a1da355a11804b /modern/src/components/registration/LoginForm.js | |
parent | 4a6ed2462ed5ed2960fc8245ac3c5bae967e685b (diff) | |
parent | 16d579d1628bd8aa4a8d1f262ed70face50af907 (diff) | |
download | trackermap-web-fbf1be890ad30cd3a294c969fed3efe61ad59974.tar.gz trackermap-web-fbf1be890ad30cd3a294c969fed3efe61ad59974.tar.bz2 trackermap-web-fbf1be890ad30cd3a294c969fed3efe61ad59974.zip |
Merge remote-tracking branch 'origin/master' into device_list
Diffstat (limited to 'modern/src/components/registration/LoginForm.js')
-rw-r--r-- | modern/src/components/registration/LoginForm.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js index e083541c..e6da05e3 100644 --- a/modern/src/components/registration/LoginForm.js +++ b/modern/src/components/registration/LoginForm.js @@ -41,7 +41,10 @@ const LoginForm = () => { const handleLogin = async (event) => { event.preventDefault(); - const response = await fetch('/api/session', { method: 'POST', body: new URLSearchParams(`email=${email}&password=${password}`) }); + const response = await fetch('/api/session', { + method: 'POST', + body: new URLSearchParams(`email=${encodeURIComponent(email)}&password=${encodeURIComponent(password)}`), + }); if (response.ok) { const user = await response.json(); dispatch(sessionActions.updateUser(user)); |