diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2014-03-10 11:32:04 +0000 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2014-03-10 11:32:04 +0000 |
commit | 0434ed0c1f14bb856e11925dbf45605f10734449 (patch) | |
tree | 9beec6a0fd136924dded9fa3361966b11e83e224 | |
parent | 6db67ec2eb252912d0dc1e2bbb1fadcd94be83d4 (diff) | |
parent | 2a078069dcfd01c7bf573d53340c8264c3dc4263 (diff) | |
download | gitano-0434ed0c1f14bb856e11925dbf45605f10734449.tar.gz |
Merge remote-tracking branch 'origin/master' into baserock/morph
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | bin/.gitignore | 2 | ||||
-rw-r--r-- | lib/gitano/usercommand.lua | 12 |
3 files changed, 10 insertions, 7 deletions
@@ -11,8 +11,9 @@ http://git.gitano.org.uk/ -- Enjoy them. ## Dependencies -Gitano depends on [Luxio], [Lace], [Supple], [Gall] and [Clod]. +Gitano depends on [lua-scrypt], [Luxio], [Lace], [Supple], [Gall] and [Clod]. +[lua-scrypt]: http://www.gitano.org.uk/lua-scrypt/ [Luxio]: http://www.gitano.org.uk/luxio/ [Lace]: http://www.gitano.org.uk/lace/ [Supple]: http://www.gitano.org.uk/supple/ diff --git a/bin/.gitignore b/bin/.gitignore index d0e0d7e..48c3c13 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -4,3 +4,5 @@ gitano-update-hook gitano-update-ssh gitano-setup gitano-pre-receive-hook +gitano-command.cgi +gitano-smart-http.cgi diff --git a/lib/gitano/usercommand.lua b/lib/gitano/usercommand.lua index 3c8b467..2e4f1b7 100644 --- a/lib/gitano/usercommand.lua +++ b/lib/gitano/usercommand.lua @@ -279,22 +279,22 @@ end local function builtin_passwd_run(conf, _, cmdline, env) local user = env.GITANO_USER - local password = sio.stdin:read("*l") + local password = sio.stdin:read("*l") or "" local method, hash = util.hash_password(password) - if conf.users[user].hash == nil and password == "" then + if conf.users[user]["passwd.hash"] == nil and password == "" then log.chat(string.format("Password for %s is not set and no password was" .. " provided, no action taken.", user)) return "exit", 0 end if password ~= "" then - conf.users[user].method = method - conf.users[user].hash = hash + conf.users[user]["passwd.method"] = method + conf.users[user]["passwd.hash"] = hash else -- user's password will be removed - conf.users[user].method = nil - conf.users[user].hash = nil + conf.users[user]["passwd.method"] = nil + conf.users[user]["passwd.hash"] = nil end local ok, msg |