Skip to content

Bug handling non-url-safe characters in XML document #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amagid opened this issue Jul 16, 2019 · 0 comments · Fixed by #89
Closed

Bug handling non-url-safe characters in XML document #71

amagid opened this issue Jul 16, 2019 · 0 comments · Fixed by #89
Assignees
Labels
bug Something isn't working

Comments

@amagid
Copy link
Contributor

amagid commented Jul 16, 2019

Simple issue in iRest.js which causes &, #, or ? anywhere in the XML document to cause an XMLSERVICE error.

Arises because JavaScript's encodeURI() does not encode these characters, resulting in an invalid URI if the XML document contains them - need to use encodeURIComponent() on each query parameter instead.

@kadler kadler added the bug Something isn't working label Jan 13, 2020
kadler added a commit that referenced this issue Jan 13, 2020
encodeURI() does not encode &, #, or ? characters, so if they are
present anywhere in the submitted XML document, they will cause the URI
to be invalid and result in a 400 error. Instead, using
encodeURIComponent() on each individual URL param will safely encode all
possible characters.

Thanks to @amagid for the original PR.

Obsoletes #72
Fixes #71

Co-authored-by: Aaron Magid <[email protected]>
abmusse pushed a commit that referenced this issue Jan 17, 2020
encodeURI() does not encode &, #, or ? characters, so if they are
present anywhere in the submitted XML document, they will cause the URI
to be invalid and result in a 400 error. Instead, using
encodeURIComponent() on each individual URL param will safely encode all
possible characters.

Thanks to @amagid for the original PR.

Obsoletes #72
Fixes #71

Co-authored-by: Aaron Magid <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants