How do I have to escape ampersands in URLs when logging in with OpenID?

↘锁芯ラ 提交于 2020-01-14 22:50:15

问题


Well actually I know, that I should replace & by %26

But I'm using this URL to log in with OpenID:

https://innubili-gidea.appspot.com/_ah/login_redir?claimid=https://www.google.com/accounts/o8/site-xrds?hd=icada.com&continue=https://innubili-gidea.appspot.com/%3Fdomain%3Dicada.com%26campaign%3D2%26

As you can see, the continue parameter is properly escaped.

But after being redirected through Googles login pages, it redirects me back to

https://innubili-gidea.appspot.com/?domain=icada.com

So the &campaign=2 parameter is missing

Can you confirm, that I escaped the continue parameter correctly?

For then it looks to me as this seems to be an issue at Googles login.


回答1:


You are correctly escaping the Url, and yes, this is a well-known issue.




回答2:


I just found out it works, if I escape the ampersand twice.

& -> %26 -> %2526


来源:https://stackoverflow.com/questions/4851487/how-do-i-have-to-escape-ampersands-in-urls-when-logging-in-with-openid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!