-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP8266WebServer url decoding is performed early on x-www-form-urlencoded buffer #3669
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
Labels
waiting for feedback
Waiting on additional info. If it's not received, the issue may be closed.
Comments
@innodron just google github how to test pr locally |
since I cannot see the reason why key would need decoding
@devyte Should I create a PR? |
@igrr There seems to be a thorough analysis here. Do we want a new PR for this, or add these changes to an existing PR? If the latter, to which one? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
waiting for feedback
Waiting on additional info. If it's not received, the issue may be closed.
Description
Any text input field containing '&' (encoded %26) is wrongly parsed as further arguments because parsing.cpp is performing urlDecode() on the entire buffer for "application/x-www-form-urlencoded" type header. Instead, url decoding should be executed on the parsed arguments themselves in _parseArguments().
(Indeed 2.4.0-rc.1 _parseArguments() is already performing urlDecode() on the arguments parsed)
which then parsed in _parseArguments() as:
though it should have been parsed to:
I fixed the issue temporarily as following:
though it may need a finer resolution by the original author(s)
Hardware
Hardware: Sparkfun ESP8266 Thing Developer
Core Version: 2.4.0-rc.1
Settings in IDE
Module: Sparkfun ESP8266 Thing Developer
Flash Size: 512
CPU Frequency: 80Mhz
Flash Mode: qio
Flash Frequency: 40Mhz
Upload Using: SERIAL
Reset Method: nodemcu
The text was updated successfully, but these errors were encountered: