Skip to content
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

Fix #137 by removing needless deXSS function #138

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

mwootten
Copy link
Contributor

The deXSS function escapes text so that it's safe to insert as raw HTML. However, its output gets passed into .val() and .text(), which directly manipulate the DOM and so don't require or support escaping; thus, the escaping breaks the queries. Remove deXSS where superfluous and replace its one non-superfluous use with safe DOM manipulation.

The deXSS function escapes text so that it's safe to insert as raw
HTML. However, its output gets passed into .val() and .text(), which
directly manipulate the DOM and so don't require or support escaping;
thus, the escaping breaks the queries. Remove deXSS where superfluous
and replace its one non-superfluous use with safe DOM manipulation.
mwootten added a commit to mwootten/petscan_rs that referenced this pull request Aug 28, 2023
The backend decodes querystrings with the qstring crate. However, that
decodes both a plus sign and a URL-encoded plus sign to exactly the
same thing, erasing the distinction between plus signs and spaces
(see algesten/qstring#3). This patch instead uses the underlying url
crate, which handles plus signs correctly.

This fix should be combined with magnusmanske#138, which fixes the frontend piece;
however, merging just this one would correct the saving in the backend.
@magnusmanske magnusmanske merged commit d353efe into magnusmanske:master Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants