Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 03:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 03:08:52 +0300
commit38c1da5195bdcaab0b20bf6303a675b9283ac476 (patch)
tree0619c87e942aa03fb6e1c050daabe961f8d01e0a /app/controllers
parentab5672c13d7fe5c79fdeac10e7505187cf4ba606 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb15
-rw-r--r--app/controllers/omniauth_callbacks_controller.rb17
2 files changed, 1 insertions, 31 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 0767fadbe71..9749af08dca 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -29,7 +29,6 @@ class ApplicationController < ActionController::Base
before_action :limit_session_time, if: -> { !current_user }
before_action :authenticate_user!, except: [:route_not_found]
before_action :enforce_terms!, if: :should_enforce_terms?
- before_action :validate_user_service_ticket!
before_action :check_password_expiration, if: :html_request?
before_action :ldap_security_check
before_action :default_headers
@@ -326,20 +325,6 @@ class ApplicationController < ActionController::Base
headers['Content-Disposition'] = "attachment; filename=\"#{csv_filename}\""
end
- def validate_user_service_ticket!
- return unless signed_in? && session[:service_tickets]
-
- valid = session[:service_tickets].all? do |provider, ticket|
- Gitlab::Auth::OAuth::Session.valid?(provider, ticket)
- end
-
- unless valid
- session[:service_tickets] = nil
- sign_out current_user
- redirect_to new_user_session_path
- end
- end
-
def check_password_expiration
return if session[:impersonator_id] || !current_user&.allow_password_authentication?
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index b9964e8ca01..a2e0670d7e1 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -10,7 +10,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
after_action :verify_known_sign_in
- protect_from_forgery except: [:cas3, :failure] + AuthHelper.saml_providers, with: :exception, prepend: true
+ protect_from_forgery except: [:failure] + AuthHelper.saml_providers, with: :exception, prepend: true
feature_category :system_access
@@ -57,15 +57,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
redirect_unverified_saml_initiation
end
- def cas3
- ticket = params['ticket']
- if ticket
- handle_service_ticket oauth['provider'], ticket
- end
-
- handle_omniauth
- end
-
def auth0
if oauth['uid'].blank?
fail_auth0_login
@@ -146,12 +137,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
redirect_to profile_account_path, notice: _('Authentication method updated')
end
- def handle_service_ticket(provider, ticket)
- Gitlab::Auth::OAuth::Session.create provider, ticket
- session[:service_tickets] ||= {}
- session[:service_tickets][provider] = ticket
- end
-
def build_auth_user(auth_user_class)
auth_user_class.new(oauth)
end