You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pyramid actually raises a specific URLDecodeError when there's a badly-encoded path component, but by default it 500s because there isn't a builtin exception view for URLDecodeError. Apps or extensions can register a custom exception view to catch this and turn it into a 400:
This is simpler than our current invalid_path_info_tween_factory() and is also the right solution according to the Pyramid docs for URLDecodeError and multiple GitHub comments from Pyramid maintainers.
Unfortunately Pyramid does not raise URLDecodeError for badly encoded query params, so that one will still have to be fixed by a tween.
See Pylons/pyramid#312 (comment) (and there are also several other maintainer comments on GitHub telling people to use an exception view for this)
The text was updated successfully, but these errors were encountered:
Pyramid actually raises a specific
URLDecodeError
when there's a badly-encoded path component, but by default it 500s because there isn't a builtin exception view forURLDecodeError
. Apps or extensions can register a custom exception view to catch this and turn it into a 400:This is simpler than our current
invalid_path_info_tween_factory()
and is also the right solution according to the Pyramid docs forURLDecodeError
and multiple GitHub comments from Pyramid maintainers.Unfortunately Pyramid does not raise
URLDecodeError
for badly encoded query params, so that one will still have to be fixed by a tween.See Pylons/pyramid#312 (comment) (and there are also several other maintainer comments on GitHub telling people to use an exception view for this)
The text was updated successfully, but these errors were encountered: