stash icon indicating copy to clipboard operation
stash copied to clipboard

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

Open slyboots opened this issue 9 years ago • 4 comments

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 avatar Oct 14 '16 03:10 slyboots

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

slyboots avatar Oct 14 '16 03:10 slyboots

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

oefe avatar Jan 29 '17 15:01 oefe

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'

ywangd avatar Jan 29 '17 20:01 ywangd

@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.

jsbain avatar Jan 30 '17 08:01 jsbain