开发者

Special characters in Password are converting URL into a String

开发者 https://www.devze.com 2023-01-27 10:18 出处:网络
Special characters in Password are converting URL into a String and truncating the URL after the password in the URL .

Special characters in Password are converting URL into a String and truncating the URL after the password in the URL .

Here is what I am using

webbrowser.navigate("http://username:pww@word@www.something.com")

when I see the above request in the VS browser it is like ..

http://username:pww

and the result is "Page Not Found "

When there is no special character in the password the li开发者_如何学Cnk goes fine without any issues ..Please Help Thanks In Advance


webbrowser.navigate("http://username:pww%40word@www.something.com")


Please use HTTP POST instead of HTTP GET to send passwords to your website. Special characters don't matter so much with POST, and it's somewhat more secure (user's neighbor can't see the password in the URL bar).

If you must use GET, URL-encode the password. For example, you can replace "@" with "%40". For C#, see HttpUtility.UrlEncode. You'll probably need to encode username and password separately, and then build the URL.

0

精彩评论

暂无评论...
验证码 换一张
取 消