-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Reject non-str values in form data #9292
Conversation
|
I made this branch 3 weeks ago, but didn't open a PR... |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #9292 +/- ##
=======================================
Coverage 98.55% 98.55%
=======================================
Files 107 107
Lines 34855 34867 +12
Branches 4128 4134 +6
=======================================
+ Hits 34352 34364 +12
Misses 335 335
Partials 168 168
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Should we just restrict it to strings and only put it in v4? I'm not sure it really makes sense to allow non-str, given that urlencode() will just str() any arguments, and seems to lead to unexpected behaviour. There's probably a fair number of ints in the wild though, so probably don't want to push it in v3. |
|
Need to think about this one. Yarl is very flexible about encoding params to string for query string and we know that’s heavily used…. But all the type checks add up quick. Maybe that’s not even relevant for this case |
Yeah, this is about FormData creating 'x-www-form-urlencoded' data. Yarl isn't involved here. |
|
The main issue is unexpected results, like params is where yarl does the query encoding, which is a completely separate thing. |
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.
I think it’s ok. I probably wouldn’t backport it though
Fixes #8052.