Skip to content

Commit

Permalink
fix: encode username and password when posting to server in AuthBound…
Browse files Browse the repository at this point in the history
…ary (#467)

can now correctly log in with usernames/passwords that contain
URL sensitive characters

Co-authored-by: Austin McGee <[email protected]>
  • Loading branch information
awgaan and amcgee committed Oct 7, 2020
1 parent 658fa0b commit b0cc51d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adapter/src/AuthBoundary/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export const LoginModal = () => {
{
method: 'POST',
credentials: 'include',
body: `j_username=${username}&j_password=${password}`,
body: `j_username=${encodeURIComponent(
username
)}&j_password=${encodeURIComponent(password)}`,
headers: {
'X-Requested-With': 'XMLHttpRequest',
Accept: 'application/json',
Expand Down

0 comments on commit b0cc51d

Please sign in to comment.