From eee76b604ee2a7a1a85351ce6527ef7f7910e943 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 22 Jun 2019 11:10:28 +0800 Subject: [PATCH] git passsword --- app/controllers/gits_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index 92451d655..e5d33acab 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -3,7 +3,7 @@ class GitsController < ApplicationController #供git-workhorse反向调用认证 def auth # HTTP_AUTHORIZATION: "Basic 这里base64编码的的密码(user:passwd)" - logger.info("11111112222223333#{request.env["HTTP_AUTHORIZATION"]}") + logger.info("11111112222223333 HTTP_AUTHORIZATION: #{request.env["HTTP_AUTHORIZATION"]}") logger.info("11111112222223333: request is #{request.env}") #logger.info("#########-----request_env: #{request.env}") # {"service"=>"git-receive-pack", "controller"=>"gits", "action"=>"auth", @@ -20,7 +20,9 @@ class GitsController < ApplicationController uid_logger("git start auth: input_username is #{input_username}") # Git 超级权限用户 + logger.info("666666666: a: #{input_username}, b: #{gituser}, c #{input_password} , d #{gitpassword}}") if input_username == gituser && input_password == gitpassword + result = true else # 用户是否对对象拥有权限