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

add BadRequestKeyError.show_exception #1592

merged 1 commit into from Jun 25, 2019


None yet
1 participant
Copy link

commented Jun 25, 2019

See pallets/flask#3249. The behavior introduced in 0.15.0 was to show the error unless e.args was empty. However, this makes it impossible for an error handler to know what the missing key was.

Instead, add a show_exception attribute to explicitly control the behavior. This defaults to false for a more secure default behavior. Now Flask can do:

if app.debug:
    e.show_exception = True

While this is technically not backwards compatible, it adds information overall and sets a more secure default, and it was a fairly obscure and recent change to begin with, so I'm comfortable adding this to 0.15.5.

@davidism davidism added this to the 0.15.5 milestone Jun 25, 2019

@davidism davidism force-pushed the keyerror branch from 2719776 to 7cd3720 Jun 25, 2019

@davidism davidism merged commit 5aa9c15 into 0.15.x Jun 25, 2019

1 check failed

Tests Build #20190625.2 failed

@davidism davidism deleted the keyerror branch Jun 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.