Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using email as a login for host_string fails. #268

Closed
bitprophet opened this issue Aug 19, 2011 · 2 comments
Closed

Using email as a login for host_string fails. #268

bitprophet opened this issue Aug 19, 2011 · 2 comments
Labels
Milestone

Comments

@bitprophet
Copy link
Member

@bitprophet bitprophet commented Aug 19, 2011

Description

I need to access an SSH site that the username is an email address.

When passing host_string as

 me@email.com:mypass@example.com:22

It gets confused and tries to connect with "email.com@example.com" to the SSH client.

I attempted to encode the @ into its urlencoded equivalent (%40) which did not work.

I spoke on the mailing list with goosemo...

goosemo: yeah it's just an issue with normalize() as it's a regex to parse out the host_string vars
goosemo: host_pattern = r'((?P[^@]+)@)?(?P[^:]+)(?P\d+))?'
goosemo: so if you have suggestions on how to make it so that'll match properly for your use case, that'd be awesome

I don't have any suggestions as of right now (not a regex guru).

Thanks.


Originally submitted by Thadeus Burgess (thadeusb) on 2010-12-23 at 11:18am EST


Closed as Done on 2011-02-27 at 12:05am EST

@ghost ghost assigned bitprophet Aug 19, 2011
@bitprophet

This comment has been minimized.

Copy link
Member Author

@bitprophet bitprophet commented Aug 19, 2011

Jeff Forcier (bitprophet) posted:


This is definitely a valid issue; I think we might be able to get away with simply nuking the [^@] from the existing regex, as that now strikes me as premature optimization of a sort. Certainly, it assumes a username can't have an @ in it, which appears to be incorrect. (If it's possible for a hostname to also have @s in it, however, then we might be in trouble -- but I'm hoping that is not the case. I certainly can't think of any such use cases.)


on 2010-12-29 at 03:25pm EST

@bitprophet

This comment has been minimized.

Copy link
Member Author

@bitprophet bitprophet commented Aug 19, 2011

Jeff Forcier (bitprophet) posted:


Applied in changeset commit:73783cd61784055c84dd34738fb3b88f658dc556.


on 2011-02-27 at 12:05am EST

@bitprophet bitprophet closed this Aug 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.