-
Notifications
You must be signed in to change notification settings - Fork 185
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
UnicodeDecodeError within webob when parsing query strings with invalid URL encoded parameters #195
Comments
This is mostly a duplicate of #161, I think. |
I think that if you want access to the invalidly-encoded parts, you're probably going to have to extract them from |
@dairiki Thanks for the suggestion of using request.query_string, that make sense. However I think one of the bigger issues is that any multidict access in the webapp can cause an error when users can type malform input in the query string. Even if I identified there's an undecodeable request.query_string and special handle it, if any other part of the webapp or middleware (that I may or may not control) does a simple multidict lookup (request.GET.get("prettyjson")), it may foil my attempts Tying it back to my use case, I'll still be processing the request as per normal, only to forward the malformed query params as-is after I'm done. It's during the processing that any multidict lookup outside my control will cause issues. |
@mmerickel Thanks for the note! I'm going to continue discussion on this at #161 where there is a bit more context. |
Related: Pylons/pyramid#1374 |
Closing this to consolidate the discussion in #161. |
UnicodeDecodeError within webob when parsing query strings with invalid URL encoded parameters
ie
Traceback:
This issue is more apparent if the URL is used as a template, and a user either programmatically fills the template URL or enters it by hand.
For example:
In our use case, we don't actually consume the custom query params, but rather redirect these query params to a final URL of choice for a different web application to consume. Hence we ideally want to keep the original query parameters even if we couldn't utf-8 decode them.
The text was updated successfully, but these errors were encountered: