Skip to content

Search API request for "[]"square brackets in "Search Projects" results in to 400 HTTP Status Code #619

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

Open
rprakash20 opened this issue May 9, 2020 · 2 comments

Comments

@rprakash20
Copy link

rprakash20 commented May 9, 2020

Describe the bug
Search API request for "[]"square brackets in "Search Projects" results in to 400 HTTP Status Code. So, the search fails and due to which it lists out all the projects in the left side pane.

To Reproduce / Actual Behavior
Steps to reproduce the behavior:

  1. login to https://challenges.topcoder-dev.com with credentials "jcori / appirio123"
  2. Check the left hand side pane containing "Challenge Editor" Heading.
  3. Open browser inspector and click on "Network" tab
  4. Search for "[]"(square brackets) in "Search Projects" text box
  5. Check the response code of API request for search in the "Network" tab of Inspector
  6. Check the Search results under the challenge Editor

Expected Behavior
Search API request should return a 200 status code without crashing and the search should list only project which contains square brackets in their name. If none of the project names have square brackets in their name then it must not show anything.

Screenshots
Screenshot 2020-05-09 at 5 01 46 PM
Screenshot 2020-05-09 at 5 02 42 PM

Desktop (please complete the following information):

  • OS: macOS Mojave Version 10.14.6
  • Browser : Chrome
  • Version 81.0.4044.138 (Official Build) (64-bit)

Additional context
Add any other context about the problem here.

@rprakash20 rprakash20 added Functional Bug Hunt Functional category May 7 Bug Hunt labels May 9, 2020
@jmgasper
Copy link
Collaborator

jmgasper commented May 10, 2020

@rootelement / @ThomasKranitsas - Logged a project API regarding this problem here:

topcoder-archive/topcoder_platform-projects-api#34

Probably best to fix this at the project-api level, just in case. Seems like this could be a potential attack vector, based on how that text is being sent right to ES.

@vikasrohit
Copy link

The error should be fixed now. Though the issue with project api is not yet fixed. I have the changed the way we are calling the projects api for now.

@jmgasper can you please give some examples of possible attack? It would be great if you can some security details in to the issue topcoder-platform/tc-project-service#572

@acshields acshields added the P3 label Jun 4, 2020
@acshields acshields added this to the Backlog milestone Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants