summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-06-30 10:57:17 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-06-30 10:57:17 +0100
commitae594dd03df55be82c5c52066deb458684446856 (patch)
tree7e1fa159905f80fb4a1eeae77ab257ca81d64066
parent3b13d8680a57b9761b4cf61903f067ce1b62753b (diff)
downloadgitano-ae594dd03df55be82c5c52066deb458684446856.tar.gz
LIB: Alter ssh key pattern to support 'comments'
-rw-r--r--lib/gitano/config.lua2
-rw-r--r--lib/gitano/usercommand.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitano/config.lua b/lib/gitano/config.lua
index fa30e64..5babc53 100644
--- a/lib/gitano/config.lua
+++ b/lib/gitano/config.lua
@@ -124,7 +124,7 @@ local function parse_admin_config(commit)
return nil, "Key " .. filename .. " has newlines in it -- is it in the wrong format?"
end
- local keytype, keydata, keytag = this_key:match("^([^ ]+) ([^ ]+) ([^ ]+)$")
+ local keytype, keydata, keytag = this_key:match("^([^ ]+) ([^ ]+) ([^ ].*)$")
if not (keytype and keydata and keytag) then
return nil, "Unable to parse key, " .. filename .. " did not smell like an OpenSSH v2 key"
end
diff --git a/lib/gitano/usercommand.lua b/lib/gitano/usercommand.lua
index 55911ca..ea7a813 100644
--- a/lib/gitano/usercommand.lua
+++ b/lib/gitano/usercommand.lua
@@ -156,7 +156,7 @@ local function builtin_sshkey_run(conf, _, cmdline, env)
end
elseif cmdline[2] == "add" then
local sshkey = sio.stdin:read("*l")
- local keytype, keydata, keytag = sshkey:match("^([^ ]+) ([^ ]+) ([^ ]+)$")
+ local keytype, keydata, keytag = sshkey:match("^([^ ]+) ([^ ]+) ([^ ].*)$")
if not (keytype and keydata and keytag) then
log.error("Unable to parse key,", filename,
"did not smell like an OpenSSH v2 key")