From 283ee9e5398c8bbb9bd3ad94027af6893bfa8a45 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 22 Jun 2019 11:13:38 +0800 Subject: [PATCH] git usrname strip --- app/controllers/gits_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index e5d33acab..4064f0f99 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -20,9 +20,7 @@ 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 - + if input_username.strip == gituser.strip && input_password.strip == gitpassword.strip result = true else # 用户是否对对象拥有权限