ywangd / stash

StaSh - Shell for Pythonista
MIT License
1.94k stars 227 forks source link

Hashtags ('#') in password string cause pushing to remote to fail #214

Open slyboots opened 8 years ago

slyboots commented 8 years ago

when pushing to a remote using stash, if the password string contains a hashtag ('#') it will cause a urllib error 401 if on the right side of the colon (' : ') and a bad request error if on the left side. Im running in iPhone 6 plus w/ iOS 10 and pythonista 2

slyboots commented 8 years ago

Also this isnt a serious issue, I guess most people don't have hashtags in their password strings and now neither do I.

oefe commented 7 years ago

git push embeds the password in the url, which is deprecated according to RFC 3986.

ywangd commented 7 years ago

Somehow I just noticed this issue. My guess is that any texts after # is interpreted as comments as like in Bash. So to avoid # being treated as start of comments, you can single quote your entire URL, e.g. git push 'url_containing_#_char'

jsbain commented 7 years ago

@oefe This is mostly for interaction with dulwich, keeping with the other transport types. The url is not actually sent over the wire this way -- this gets stripped out into an HTTPBasicAuthentication flow.