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

Use rfind to locate the @ in connection string #139

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

tomas789
Copy link
Contributor

Our counterparty uses email addresses as usernames. The connection string looks something like

The resolve function looks for the @ when parsing the URL using find function. That finds the first @ which means the username is john.doe instead of [email protected]. Using rfind instead resolves this issue. I'm not sure if this is valid according to the URL standard. It should not break any existing existing functionality as the hostname seems to not allow @ sign.

Perhaps a better approach would be to rely on an external crate for this. The url crate comes to mind.

@jonhoo
Copy link
Collaborator

jonhoo commented Dec 19, 2023

This change is Reviewable

Copy link
Member

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Will cut a new release for this

@NobodyXu
Copy link
Member

Looks like we need to bump MSRV

@NobodyXu
Copy link
Member

Given that all CI runs except for these two which runs cargo +nightly -Zminimal-version failed, it's probably a bug in getrandom v0.1.7

@NobodyXu NobodyXu merged commit 4b49d36 into openssh-rust:master Dec 20, 2023
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants