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 'lib/gitlab/otp_key_rotator.rb')
-rw-r--r--lib/gitlab/otp_key_rotator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/otp_key_rotator.rb b/lib/gitlab/otp_key_rotator.rb
index 1d3200aa099..b65c8613d00 100644
--- a/lib/gitlab/otp_key_rotator.rb
+++ b/lib/gitlab/otp_key_rotator.rb
@@ -32,8 +32,8 @@ module Gitlab
def rotate!(old_key:, new_key:)
old_key ||= Gitlab::Application.secrets.otp_key_base
- raise ArgumentError.new("Old key is the same as the new key") if old_key == new_key
- raise ArgumentError.new("New key is too short! Must be 256 bits") if new_key.size < 64
+ raise ArgumentError, "Old key is the same as the new key" if old_key == new_key
+ raise ArgumentError, "New key is too short! Must be 256 bits" if new_key.size < 64
write_csv do |csv|
ActiveRecord::Base.transaction do