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
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