Closed jamesdabbs closed 8 years ago
Hi @jamesdabbs , thanks very much! No need to be anxious. =)
I hadn't really looked at this part of the code before. But after reading about URI schemes, looking at the network-uri
documentation, and trying some examples, it seems to me that there is another bug in the code as well. Namely, if a URI has no colon before the @ , like http://byorgey@haskell.org
, then byorgey
is a username, not a password. Currently the code just does break (==':')
without even checking whether a colon is present. Does this make sense to you?
Note, I'm not asking you to do anything in particular or change anything about your code, at this point I'm just trying to understand things!
After looking into this some more, I can no longer find anything which says that byorgey@haskell.org
would be valid. So I think I'm just going to merge this as-is. Thanks again for the patch, and sorry for the long delay!
uriUserInfo
includes the trailing@
in the password, which should not be part of thesetAuthorizationBasic
call, which was breaking any authenticated RPC call that I tried to make.Please let me know if you'd prefer a different way of going about this or have thoughts about writing tests or anything (first Haskell PR here, so I'm overly anxious about it). Cheers!