diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2014-04-09 11:55:19 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2014-04-09 11:55:19 +0100 |
commit | 93f36f49ff6a92f307e1eacbdd91673734ca7dc5 (patch) | |
tree | b858916e26e0b1d013fe62f04aa4068056582079 /bin | |
parent | a880701ddeadf5a2280a9d5ab710e29c86db09bc (diff) | |
download | gitano-93f36f49ff6a92f307e1eacbdd91673734ca7dc5.tar.gz |
Ensure we pass the repo through otherwise HTTP commands might not work
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/gitano-command.cgi.in | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/gitano-command.cgi.in b/bin/gitano-command.cgi.in index ba16538..1954635 100755 --- a/bin/gitano-command.cgi.in +++ b/bin/gitano-command.cgi.in @@ -29,7 +29,7 @@ function url_decode(str) return str end -function run_command(cmd, cmdline, parsed_cmdline, user, config, env) +function run_command(cmd, cmdline, parsed_cmdline, user, config, env, repo) gitano.log.debug("Welcome to " .. config.global.site_name) gitano.log.debug("Running:") for i = 1, #parsed_cmdline do @@ -73,11 +73,12 @@ if os.getenv("QUERY_STRING") then gitano.log.buffer_output() - local authorized, cmd, parsed_cmdline, config, env = + local authorized, cmd, parsed_cmdline, config, env, repo = gitano.auth.is_authorized(user, "http", cmdline) if authorized then - local exit = run_command(cmd, cmdline, parsed_cmdline, user, config, env) + local exit = run_command(cmd, cmdline, parsed_cmdline, + user, config, env, repo) stdout:write("Status: " .. (exit == 0 and "200 OK" or "400 Bad request") .. "\r\n\r\n") |