Skip to content
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

incorrect bug fix. ESP8266 url encoded delimitters parsed incorrectly #3415

Closed
Jeroen88 opened this issue Jul 12, 2017 · 8 comments
Closed

Comments

@Jeroen88
Copy link
Contributor

Jeroen88 commented Jul 12, 2017

Basic Infos

incorrect bug fix. ESP8266 url encoded delimitters parsed incorrectly

Hardware

Hardware: ESP-12E
Core Version: 2.4.0-rc1

Description

Problem description
URL encoded delimitter characters are decoded to early in the latest committed bug fix. A %-encoded '?', '=' and '&' are decoded to early. They should be decoded later.
So
line 94: searchString = urlDecode(url.substring(hasSearch + 1)); should be replaced (back) by searchString = url.substring(hasSearch + 1);
And
line 320: arg.key = data.substring(pos, equal_sign_index); should be replaced by arg.key = urlDecode(data.substring(pos, equal_sign_index));
line 321: arg.value = data.substring(equal_sign_index + 1, next_arg_index); should be replaced by arg.value = urlDecode(data.substring(equal_sign_index + 1, next_arg_index));

@devyte
Copy link
Collaborator

devyte commented Jul 12, 2017 via email

@Jeroen88
Copy link
Contributor Author

@DEVTE, thanx for your comment, the bad fix is in 2.4.0-rc1. I just updated my issue!

@earlephilhower
Copy link
Collaborator

Sorry, @Jeroen88, but I've not really used the built-in web server so I don't think I can help with a pull in this case because I wouldn't be able to test it. I suggest you fork the repo and apply your 2-line patch, verify it fixes your problem and doesn't break anything else, then submit in a PR on the 2.4.0-rc1 codebase. It's very easy to do right from the github web interface, even.

@earlephilhower
Copy link
Collaborator

Actually, @Jeroen88 , check out this PR...it seems to fix what you're seeing:
#2956

@Jeroen88
Copy link
Contributor Author

Thank you @earlephilhower, I am going to try that later...!

@Jeroen88
Copy link
Contributor Author

@earlephilhower, same issue, indeed. But "This branch is out-of-date with the base branch" let me think that this will not be used?

@earlephilhower
Copy link
Collaborator

No it should be fime. They just need to merge it with the latest head. It's a 1-button click operation unless there are merge conflicts.

@Jeroen88
Copy link
Contributor Author

Thanks again for your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants