git_shell.rb revision f35e888435be4e803bf73937cb5f173050a172e6
require 'open3'
@command = command
end
def exec
STDERR.puts "System in maintenance mode. Please try again later."
exit 1
end
exit 1 unless @command
if GIT_CMDS.include?(@git_cmd)
# required to pass the ID to the update hook
else
message = "git-shell: Access denied for git command <#{@command}> by #{log_username}."
STDERR.puts "Access denied."
end
else
message = "git-shell: Attempt to execute disallowed command <#{@command}> by #{log_username}."
STDERR.puts 'Not allowed command'
end
end
end
cmd = "#{@git_cmd} #{repo_full_path}"
Rails.logger.info "git-shell: executing git command <#{cmd}> for #{log_username}."
end
end
end
end
"user with key #{@key_id}"
end
end