Skip to content

authorized_key entry is not updated when options contain whitespace - #38411

Merged
cachedout merged 1 commit into
saltstack:developfrom
martin-helmich:bugfix/issue-18983
Dec 22, 2016
Merged

cachedout merged 1 commit into
saltstack:developfrom
martin-helmich:bugfix/issue-18983

Conversation

@martin-helmich

@martin-helmich martin-helmich commented Dec 22, 2016 •

Copy link
Copy Markdown
Contributor

The ssh.set_auth_key module does not update an authorized key when the key is already present in the authorized_keys file and the existing key options contain a whitespace.

This is because the _replace_auth_key helper method simply splits the line by whitespace using .split() and assumes the key type to be present as the second item. This does not work when the key options contain whitespaces.

Fixes: #18983

The `ssh.set_auth_key` module does not update an authorized key when the key options contain a whitespace.

This is because the `_replace_auth_key` helper method simply splits the line by whitespace using `.split()` and assumes the key type to be present as the second item. This does not work when the key options contain whitespaces.

Fixes: saltstack#18983
@cachedout
cachedout merged commit 9016ae0 into saltstack:develop Dec 22, 2016
@martin-helmich
martin-helmich deleted the bugfix/issue-18983 branch December 22, 2016 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants