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

Plus sign "+" is not handled properly when passed in the URLs in iOS #31

Open
ghevge opened this issue Sep 1, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ghevge
Copy link

ghevge commented Sep 1, 2024

Describe the bug
Plus sign "+" is not handled properly when passed in the URLs.
I noticed that when I pass the plus sign in a URL, if it is not escaped, if it is escaped a single time or if it is escaped twice, the plugin is passing it to the upstream as unescaped: "+"

This is causing problem on upstream, where it is processed as an empty space.

If I escape the plus sign 3 times, the plugin will pass it over as double escaped: "%252B" which again is not OK as I will read "%2B" on my server side.

Any idea what is going on here?

Thanks

To Reproduce
Pass "%2B", "%252B" and "%25252B" as params in a URL through cordova-plugin-webview-proxy in iOS.

Expected behavior
the proxy should allow passing the "%2B" as a parameter to upstream servers.

Logs
not available

@ghevge ghevge added the bug Something isn't working label Sep 1, 2024
@ghevge
Copy link
Author

ghevge commented Sep 1, 2024

If i remove the following 2 lines from the ios code, and pass in an escaped url, everything works ok

startPath = [startPath stringByRemovingPercentEncoding];
startPath = [startPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

Something is getting messed up during re-encoding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant