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:
author115100 <115100@users.noreply.github.com>2018-10-24 14:21:47 +0300
committer115100 <115100@users.noreply.github.com>2018-10-25 14:08:07 +0300
commit2a8a4897ffebd01c784c028200d0cbdfaf32695e (patch)
treed6fc3e47823dc8b7abdecebfba01e503af7b813c /lib/gitlab/auth
parent5726e51aaa19f37f76474219d0b0aa75894489e7 (diff)
saml/auth_hash: Allow 2FA bypass for SAML 2.0 responses
Closes gitlab-org/gitlab-ce/#53102.
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r--lib/gitlab/auth/saml/auth_hash.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/auth/saml/auth_hash.rb b/lib/gitlab/auth/saml/auth_hash.rb
index 316354fd50c..1af9fa40c3a 100644
--- a/lib/gitlab/auth/saml/auth_hash.rb
+++ b/lib/gitlab/auth/saml/auth_hash.rb
@@ -28,7 +28,7 @@ module Gitlab
end
def extract_authn_context(document)
- REXML::XPath.first(document, "//saml:AuthnStatement/saml:AuthnContext/saml:AuthnContextClassRef/text()").to_s
+ REXML::XPath.first(document, "//*[name()='saml:AuthnStatement' or name()='saml2:AuthnStatement']/*[name()='saml:AuthnContext' or name()='saml2:AuthnContext']/*[name()='saml:AuthnContextClassRef' or name()='saml2:AuthnContextClassRef']/text()").to_s
end
end
end