-
Notifications
You must be signed in to change notification settings - Fork 183
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
fix MPP-3802: stop ignoring bandit security checks #4684
Conversation
7f9a71f
to
63af71b
Compare
63af71b
to
c6a71b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @groovecoder! Only required change from me is creating a setting for the FxA profile timeout that can be configured via the environment.
@@ -557,15 +557,18 @@ def _cached_country_language_mapping( | |||
|
|||
mapping: PlanCountryLangMapping = {} | |||
for relay_country in relay_maps.get("by_country", []): | |||
assert relay_country not in mapping | |||
if relay_country in mapping: | |||
raise ValueError("relay_country should not be in mapping.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: these will be harder to debug, since we won't know which relay_county
was already in the mapping. However, we can expand the error message when we get to that point, instead of making every ValueError
include the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the change that made me wonder: should I go back thru this whole PR and include the value in every ValueError
message while I'm in here? I don't mind doing that now rather than later.
Made updates, but @jwhitlock if you think I should go ahead and include values in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @groovecoder!
No, I think we're OK without the detailed messages. If one of these fires in production, we'll add 1) a test to trigger the exception and 2) more information to exception message. 95% should never need it.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
This PR fixes #MPP-3802.
How to test:
pytest
ruff check .
l10n changes have been submitted to the l10n repository, if any.I've added or updated relevant docs in the docs/ directory.All UI revisions follow the coding standards, and use Protocol tokens where applicable (see/frontend/src/styles/tokens.scss
).