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

Sanitizing input text for "get" queries? #575

Open
fedarko opened this issue Aug 21, 2019 · 0 comments
Open

Sanitizing input text for "get" queries? #575

fedarko opened this issue Aug 21, 2019 · 0 comments
Labels

Comments

@fedarko
Copy link
Collaborator

fedarko commented Aug 21, 2019

Doesn't look like this has been logged as an issue before, so I'm documenting it here.

In the style of xkcd, I tried plating a specimen with the ID ');console.log('hi');. Fortunately, this doesn't result in hi being printed to the console; unfortunately, it does cause a 500 internal server error:

GET https://127.0.0.1:8181/study/1/samples?term=%27);console.log(%27hi%27); 500 (Internal Server Error)

Looks like it's the ' character (which gets converted to %27) that's problematic.

I don't imagine this is a common use case, but it might be worth addressing?

Edit: also, if this behavior is expected (i.e. the server throws an error if it detects a wacky specimen ID like ');console.log('hi');) then sorry, and feel free to close this.

@fedarko fedarko changed the title Sanitizing input text for "get" queries Sanitizing input text for "get" queries? Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant