summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-09-20 15:41:41 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-20 15:41:41 +0200
commit0672c5a92e8be90da0cb79f277bb7aee82fdba8a (patch)
tree5a22d9175f8e0af89a214a6b257b6389daf9b18a /app
parentf30005f0a99b6ab019af22a8b7db40aecd1ff066 (diff)
downloadgitlab-ce-0672c5a92e8be90da0cb79f277bb7aee82fdba8a.tar.gz
Post-merge improve of CI permissions
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/git_http_client_controller.rb6
-rw-r--r--app/models/ci/build.rb7
2 files changed, 8 insertions, 5 deletions
diff --git a/app/controllers/projects/git_http_client_controller.rb b/app/controllers/projects/git_http_client_controller.rb
index cbfd3cab3dd..383e184d796 100644
--- a/app/controllers/projects/git_http_client_controller.rb
+++ b/app/controllers/projects/git_http_client_controller.rb
@@ -32,11 +32,11 @@ class Projects::GitHttpClientController < Projects::ApplicationController
return # Allow access
end
elsif allow_kerberos_spnego_auth? && spnego_provided?
- user = find_kerberos_user
+ kerberos_user = find_kerberos_user
- if user
+ if kerberos_user
@authentication_result = Gitlab::Auth::Result.new(
- user, nil, :kerberos, Gitlab::Auth.full_authentication_abilities)
+ kerberos_user, nil, :kerberos, Gitlab::Auth.full_authentication_abilities)
send_final_spnego_response
return # Allow access
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index dd984aef318..cb87b43f6be 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -493,8 +493,11 @@ module Ci
end
def hide_secrets(trace)
- trace = Ci::MaskSecret.mask(trace, project.runners_token) if project
- trace = Ci::MaskSecret.mask(trace, token)
+ return unless trace
+
+ trace = trace.dup
+ Ci::MaskSecret.mask!(trace, project.runners_token) if project
+ Ci::MaskSecret.mask!(trace, token)
trace
end
end