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:
Diffstat (limited to 'app/controllers/profiles/passwords_controller.rb')
-rw-r--r--app/controllers/profiles/passwords_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/profiles/passwords_controller.rb b/app/controllers/profiles/passwords_controller.rb
index 5eb0f80ddc9..738c41207d5 100644
--- a/app/controllers/profiles/passwords_controller.rb
+++ b/app/controllers/profiles/passwords_controller.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
class Profiles::PasswordsController < Profiles::ApplicationController
+ include Gitlab::Tracking::Helpers::WeakPasswordErrorEvent
+
skip_before_action :check_password_expiration, only: [:new, :create]
skip_before_action :check_two_factor_requirement, only: [:new, :create]
@@ -27,6 +29,7 @@ class Profiles::PasswordsController < Profiles::ApplicationController
redirect_to root_path, notice: _('Password successfully changed')
else
+ track_weak_password_error(@user, self.class.name, 'create')
render :new
end
end
@@ -48,6 +51,7 @@ class Profiles::PasswordsController < Profiles::ApplicationController
flash[:notice] = _('Password was successfully updated. Please sign in again.')
redirect_to new_user_session_path
else
+ track_weak_password_error(@user, self.class.name, 'update')
@user.reset
render 'edit'
end
@@ -94,3 +98,5 @@ class Profiles::PasswordsController < Profiles::ApplicationController
}
end
end
+
+Profiles::PasswordsController.prepend_mod