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
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-27 22:03:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-27 22:03:56 +0300
commitd625f4e9fe78a69be0d481c20cba33b6dd88ef1a (patch)
tree510ee7d62fa2d6084a5058446cf61d328900325a /config
parent9b60052467242bbc071bcb0f74b7437fb3dfc870 (diff)
Add latest changes from gitlab-org/security/gitlab@15-2-stable-ee
Diffstat (limited to 'config')
-rw-r--r--config/feature_flags/development/ci_yaml_limit_size.yml8
-rw-r--r--config/initializers/doorkeeper.rb6
2 files changed, 5 insertions, 9 deletions
diff --git a/config/feature_flags/development/ci_yaml_limit_size.yml b/config/feature_flags/development/ci_yaml_limit_size.yml
deleted file mode 100644
index 222dc409c45..00000000000
--- a/config/feature_flags/development/ci_yaml_limit_size.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: ci_yaml_limit_size
-introduced_by_url: https://dev.gitlab.org/gitlab/gitlabhq/-/merge_requests/3126
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/29875
-milestone: '12.0'
-type: development
-group: group::pipeline authoring
-default_enabled: true
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index 6ad8b02bfea..761904009bb 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -24,7 +24,11 @@ Doorkeeper.configure do
resource_owner_from_credentials do |routes|
user = Gitlab::Auth.find_with_user_password(params[:username], params[:password], increment_failed_attempts: true)
- user unless user.try(:two_factor_enabled?)
+
+ next unless user
+ next if user.two_factor_enabled? || Gitlab::Auth::TwoFactorAuthVerifier.new(user).two_factor_authentication_enforced?
+
+ user
end
# If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.