From 12efabf0705e935f6b49980ab517dfd99183f259 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 22 Oct 2012 11:18:03 -0400 Subject: [PATCH] webapp: Allow dashes in ssh key comments when pairing. --- Assistant/Ssh.hs | 2 +- debian/changelog | 1 + ...hows:___34__bad_comment_in_ssh_public_key_ssh-rsa__34__.mdwn | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs index 1d1f99176c..0d3ebcfacb 100644 --- a/Assistant/Ssh.hs +++ b/Assistant/Ssh.hs @@ -114,7 +114,7 @@ validateSshPubKey pubkey = either error return $ check $ words pubkey (ssh, keytype) = separate (== '-') prefix checkcomment comment - | all (\c -> isAlphaNum c || c == '@') comment = ok + | all (\c -> isAlphaNum c || c == '@' || c == '-' || c == '_') comment = ok | otherwise = err "bad comment in ssh public key" addAuthorizedKeys :: Bool -> SshPubKey -> IO Bool diff --git a/debian/changelog b/debian/changelog index fb23ad7d6a..4da5330bc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ git-annex (3.20121018) UNRELEASED; urgency=low Thanks, Ben Gamari for an excellent patch set. * file:/// URLs can now be used with the web special remote. * OSX: Stop installing non-self-contained webapp into Desktop directory. + * webapp: Allow dashes in ssh key comments when pairing. -- Joey Hess Wed, 17 Oct 2012 14:24:10 -0400 diff --git a/doc/bugs/Pairing_locally_shows:___34__bad_comment_in_ssh_public_key_ssh-rsa__34__.mdwn b/doc/bugs/Pairing_locally_shows:___34__bad_comment_in_ssh_public_key_ssh-rsa__34__.mdwn index fb252fa75a..6999d714c9 100644 --- a/doc/bugs/Pairing_locally_shows:___34__bad_comment_in_ssh_public_key_ssh-rsa__34__.mdwn +++ b/doc/bugs/Pairing_locally_shows:___34__bad_comment_in_ssh_public_key_ssh-rsa__34__.mdwn @@ -19,3 +19,5 @@ bad comment in ssh public key ssh-rsa [very long GPG key jibber jabber] name@nam **end of output** git-annex version: 3.20121017, Ubuntu 12.04 + +> [[Done]], allowed dash and underscore in there now.