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

Properly encode query parameters during injection attempts #2308

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

labkey-tchad
Copy link
Member

Rationale

When adding an injection parameter to the URL query we properly encode the parameter value but we aren't encoding the key. Both need to be encoded to work correctly.

java.lang.AssertionError: Crawler: Bad request: http://localhost:8111/ListVerifyProject/query-updateQueryRow.view?Key%20Field%20%22`~!@#$%^&*()_-+=%7B%7D%5B%5D|\:;%3C%3E,.?/%E5%99%A8%E9%AA%A8=%22%3E%27%3E%27%22%3Cscript%3Ealert%28%278%28%27%29%3C%2Fscript%3E&schemaName=lists&query.queryName=Tricky%20Field%20Character&returnUrl=%2FListVerifyProject%2Flist-grid.view%3FlistId%3D7&rowId=258&inactive=true&TitrationExclusion.DataId%2FRun%2FRowId%7Eeq=34&graphWidth=425&newRun=true&issues-issues.priority%7Eneqornull=1
  at org.junit.Assert.fail(Assert.java:89)
  at org.labkey.test.util.Crawler.checkForError(Crawler.java:1297)
  at org.labkey.test.util.Crawler.tryInject(Crawler.java:1251)
  at org.labkey.test.util.Crawler.testInjection(Crawler.java:1365)
  at org.labkey.test.util.Crawler.crawlLink(Crawler.java:1136)
  at org.labkey.test.util.Crawler.crawl(Crawler.java:834)
  at org.labkey.test.util.Crawler.crawlAllLinks(Crawler.java:797)

Related Pull Requests

Changes

  • Properly encode query parameters during injection attempts

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.

1 participant