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

ssh config parsing: expand ~ in IdentityAgent path #12939

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

rufoa
Copy link
Contributor

@rufoa rufoa commented Mar 6, 2022

Currently if a user has an option in their ssh config file like this:
IdentityAgent ~/.1password/agent.sock
then cyberduck can't open the socket because the ~ in the path isn't expanded, it's treated as a literal ~

(But IdentityAgent /Users/myname/.1password/agent.sock works correctly)

This PR applies the same logic to IdentityAgent as is already used for IdentityFile, so paths with ~ work correctly.

Thanks

@rufoa rufoa requested a review from a team as a code owner March 6, 2022 20:52
@CLAassistant
Copy link

CLAassistant commented Mar 6, 2022

CLA assistant check
All committers have signed the CLA.

@dkocher dkocher added this to the 8.3.0 milestone Mar 7, 2022
Copy link
Contributor

@dkocher dkocher left a comment

Choose a reason for hiding this comment

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

Type of identityAgent must be changed accordingly.

Copy link
Contributor

@dkocher dkocher left a comment

Choose a reason for hiding this comment

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

Review usages of getIdentityAgent.

@rufoa
Copy link
Contributor Author

rufoa commented Mar 7, 2022

Is this OK or would you rather move the .getAbbreviatedPath() call to here instead?

new OpenSSHIdentityAgentConfigurator().getIdentityAgent(host.getHostname()))));

@rufoa rufoa requested a review from dkocher March 7, 2022 17:48
@rufoa rufoa requested a review from dkocher March 7, 2022 19:26
Copy link
Contributor

@dkocher dkocher left a comment

Choose a reason for hiding this comment

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

Can you please sqash the commits to a single commit using rebase -i master.

@dkocher dkocher added the sftp SFTP Protocol Implementation label Mar 8, 2022
@dkocher dkocher merged commit 9678027 into iterate-ch:master Mar 9, 2022
@dkocher dkocher linked an issue Mar 10, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sftp SFTP Protocol Implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve tilde in IdentityAgent configuration
4 participants