webapp: Allow dashes in ssh key comments when pairing.

This commit is contained in:
Joey Hess 2012-10-22 11:18:03 -04:00
parent 73533538ac
commit 12efabf070
3 changed files with 4 additions and 1 deletions

View file

@ -114,7 +114,7 @@ validateSshPubKey pubkey = either error return $ check $ words pubkey
(ssh, keytype) = separate (== '-') prefix (ssh, keytype) = separate (== '-') prefix
checkcomment comment 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" | otherwise = err "bad comment in ssh public key"
addAuthorizedKeys :: Bool -> SshPubKey -> IO Bool addAuthorizedKeys :: Bool -> SshPubKey -> IO Bool

1
debian/changelog vendored
View file

@ -13,6 +13,7 @@ git-annex (3.20121018) UNRELEASED; urgency=low
Thanks, Ben Gamari for an excellent patch set. Thanks, Ben Gamari for an excellent patch set.
* file:/// URLs can now be used with the web special remote. * file:/// URLs can now be used with the web special remote.
* OSX: Stop installing non-self-contained webapp into Desktop directory. * OSX: Stop installing non-self-contained webapp into Desktop directory.
* webapp: Allow dashes in ssh key comments when pairing.
-- Joey Hess <joeyh@debian.org> Wed, 17 Oct 2012 14:24:10 -0400 -- Joey Hess <joeyh@debian.org> Wed, 17 Oct 2012 14:24:10 -0400

View file

@ -19,3 +19,5 @@ bad comment in ssh public key ssh-rsa [very long GPG key jibber jabber] name@nam
**end of output** **end of output**
git-annex version: 3.20121017, Ubuntu 12.04 git-annex version: 3.20121017, Ubuntu 12.04
> [[Done]], allowed dash and underscore in there now.