-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP8266WebServer doesn't encode/decode correctly #1989
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
Comments
I'm using this library with urlencode and have not had any problems with the encoding/decoding. You should not encode the '=', only the value after it, if it contains quotes, spaces or other special characters. Try using assignment like "key=" + urlencode(value); You will need the urlencode/decode functions below included in your sketch: String urldecode(String str)
return encodedString; String urlencode(String str) } unsigned char h2int(char c) |
@thewhiterabbit Do not know why git closed the issue but could you please check if it's fixed now? |
@me-no-dev af06847 introduce a bug on my side
then the login form post the hidden field
argument is catched by
if password match then redirect according return argument
but with this commit (af06847 ) now argument is strangely catched and got with orignal url : it looks like the argument is polluted Sorry I did not dig more |
Looks like a mistake on my end. I have removed the line that properly stitches get and post args before parsing them. Added back in #2222 which I'll merge as soon as the check passes. Good catch @luc-github |
@luc-github no need to urlDecode in your code anymore, unless you have double encoded arguments. |
@me-no-dev thanks a lot 🎆 |
* fix urlDecode points Fixes: esp8266/Arduino#1989 esp8266/Arduino#2198 * Add missing separator between get and plain post arguments
According to https://www.ietf.org/rfc/rfc3986.txt this bugfix is incorrect. The separator should be missed if it is percent-encoded! Excerpt of rfc3986: URIs include components and subcomponents that are delimited by
|
I still got a problem with this:
#454
Decoding is done to late - it only works within the argument.
pe:
String R1 = server.arg("R1");
i let me show "R1":
http://192.168.125.150/cmd?R1=1
answer = "1"
http://192.168.125.150/cmd?R1%3D1
answer = nothing
http://192.168.125.150/cmd?R1=%3D1
answer = "=1"
%3d is decodet to "=" but not at the place i need it.
http://192.168.125.150/cmd?R1%3D1 should work as http://192.168.125.150/cmd?R1=1
I also can´t find a workaround - server.argName is only shown if there is a "=" within the url.
This is working on different kinds of Webcams and home-automation.
Greetings from Austria, Tom.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: