diff options
author | dineshpanda <dineshpanda92@gmail.com> | 2019-08-31 22:21:10 +0300 |
---|---|---|
committer | dineshpanda <dineshpanda92@gmail.com> | 2019-08-31 23:27:25 +0300 |
commit | 980303b542e95d1caf2a4b54113e63b54dbae494 (patch) | |
tree | 8e8a87132b40c65a413e8b7ac5954d38960f96c4 /app/controllers/sessions_controller.rb | |
parent | dc864927246746a34b675c7ee8ffbd1b533841e0 (diff) |
Avoid calling freeze on already frozen strings in app/controllers
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r-- | app/controllers/sessions_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 7b682cc0cc5..a6dd811ab8b 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -40,7 +40,7 @@ class SessionsController < Devise::SessionsController # token mismatch. protect_from_forgery with: :exception, prepend: true - CAPTCHA_HEADER = 'X-GitLab-Show-Login-Captcha'.freeze + CAPTCHA_HEADER = 'X-GitLab-Show-Login-Captcha' MAX_FAILED_LOGIN_ATTEMPTS = 5 def new @@ -111,14 +111,14 @@ class SessionsController < Devise::SessionsController def increment_failed_login_captcha_counter Gitlab::Metrics.counter( :failed_login_captcha_total, - 'Number of failed CAPTCHA attempts for logins'.freeze + 'Number of failed CAPTCHA attempts for logins' ).increment end def increment_successful_login_captcha_counter Gitlab::Metrics.counter( :successful_login_captcha_total, - 'Number of successful CAPTCHA attempts for logins'.freeze + 'Number of successful CAPTCHA attempts for logins' ).increment end |