diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index 1965f61ba..910864812 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -32,7 +32,7 @@ class GitsController < ApplicationController system_user = User.find_by_login(input_username) || User.find_by_mail(input_username) || User.find_by_phone(input_username) # 如果用户名密码错误 - if !system_user.check_password?(input_password) + if system_user && !system_user.check_password?(input_password) uid_logger_error("git start: password is wrong") result = false else