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

Error when doing a query on resources #1183

Closed
pombredanne opened this issue Apr 26, 2024 · 1 comment
Closed

Error when doing a query on resources #1183

pombredanne opened this issue Apr 26, 2024 · 1 comment
Labels
bug Something isn't working low priority web-ui

Comments

@pombredanne
Copy link
Member

I run a "scan_single_package" scan with this (large) input https://github.com/moby/buildkit/archive/refs/tags/v0.13.2.tar.gz

Then I go to the Resources page and eventually I craft this (possibly incorrect) query in the search box:

-detected_license_expression=:apache-2.0 -detected_license_expression=:"apache-2.0 AND bsd-new" " 		-detected_license_expression=:"apache-2.0 OR gpl-2.0-plus"

I get a 500 error.

https://<scancode.io>/project/httpsgithubcommobybuildkitarchiverefstagsv0132targz-e51adcdc/resources/?search=-detected_license_expression%3D%3Aapache-2.0+-detected_license_expression%3D%3A"apache-2.0+AND+bsd-new"+"+%09%09-detected_license_expression%3D%3A"apache-2.0+OR+gpl-2.0-plus"&detected_license_expression=ANY&sort=detected_license_expression#syntax

The extra quote in the middle of the line is the culprit because this does not fail:

-detected_license_expression=:apache-2.0 -detected_license_expression=:"apache-2.0 AND bsd-new" -detected_license_expression=:"apache-2.0 OR gpl-2.0-plus"

It looks like I can reproduce with a simple query like foo" with an unbalanced quote

@pombredanne pombredanne added bug Something isn't working web-ui low priority labels Apr 26, 2024
tdruez added a commit that referenced this issue May 6, 2024
Signed-off-by: tdruez <tdruez@nexb.com>
tdruez added a commit that referenced this issue May 7, 2024
Signed-off-by: tdruez <tdruez@nexb.com>
tdruez added a commit that referenced this issue May 7, 2024
@tdruez
Copy link
Member

tdruez commented May 7, 2024

Added validation in #1210
An error message is now displayed in place of the 500 error.

@tdruez tdruez closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority web-ui
Projects
None yet
Development

No branches or pull requests

2 participants