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

[Bug]: Some values of the color parameter in search API trigger a 500 #15022

Open
1 task done
diox opened this issue Sep 16, 2024 · 0 comments · May be fixed by mozilla/addons-server#22692
Open
1 task done

[Bug]: Some values of the color parameter in search API trigger a 500 #15022

diox opened this issue Sep 16, 2024 · 0 comments · May be fixed by mozilla/addons-server#22692

Comments

@diox
Copy link
Member

diox commented Sep 16, 2024

What happened?

When using the color parameter in the add-ons search API, we don't handle the following cases well:

https://mozilla.sentry.io/issues/5802087597/?project=6310819

What did you expect to happen?

We should:

  • For empty color, ignore the parameter completely
  • For 8 characters hex strings, cut the last 2 chars (that represent transparency, which is not relevant here) and try to parse it
  • Anything else that doesn't look like a valid color we should return a 400 error with an error message explaining that we expect a 6 chars hex string color code.

Is there an existing issue for this?

  • I have searched the existing issues

┆Issue is synchronized with this Jira Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant