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

digitalmarketplace-utils dependency: bump to 43.0.0, remove featureflags references, fix error handlers for flask 0.12 #832

Merged
merged 1 commit into from
Aug 24, 2018

Conversation

risicle
Copy link
Contributor

@risicle risicle commented Aug 24, 2018

Trello https://trello.com/c/ZH9trgjH/419-snyk-alert-for-flask-010x-vulnerability

Crown-Commercial-Service/digitalmarketplace-utils#447

Only thing that stands out about this app is the changes I had to make to generic_error_handler to accommodate flask 0.12.

callbacks.app_errorhandler(code)(generic_error_handler)
if code in default_exceptions: # flask complains if we attempt to register a handler for status code its unaware of
main.app_errorhandler(code)(generic_error_handler)
callbacks.app_errorhandler(code)(generic_error_handler)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just do for code in default_exceptions: and ditch the if?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmmmmmmmaybe... as long as we're 100% certain that werkzeug will only ever put 400 -> 599 status codes in there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they do put extra ones in, we should probably handle them 😹

…ags references, fix error handlers for flask 0.12
@risicle risicle merged commit f64bd0d into master Aug 24, 2018
@risicle risicle deleted the ris-flask-0-12 branch August 24, 2018 14:46
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.

3 participants