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

decode q param, when entering it in search box #1037

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

pvgenuchten
Copy link
Contributor

@pvgenuchten pvgenuchten commented Oct 30, 2024

Overview

this decodes the q parameter before entering it in the search box, it also replaces + by ' ', because it is not picked up by decode

Related Issue / Discussion

#1036

Additional Information

i'm using js to decode, because the urllib (with quote) library is currently not available in the jinja template, would you prefer to use python to decode?

To some, this may look like a vulnerability option to inject js via querystring, it is not the case, because the q parameter is carefully checked. try things like

https://demo.pycsw.org/cite/collections/metadata:main/items?q=%27%3Cscript%3Ealert(55)%3C%2Fscript%3E

Contributions and Licensing

(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pycsw. I confirm that my contributions to pycsw will be compatible with the pycsw license guidelines at the time of contribution.
  • I have already previously agreed to the pycsw Contributions and Licensing Guidelines

@tomkralidis tomkralidis merged commit 9165e37 into geopython:master Oct 31, 2024
0 of 3 checks passed
tomkralidis added a commit that referenced this pull request Nov 2, 2024
kalxas pushed a commit that referenced this pull request Nov 2, 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