diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /lib/gitlab/otp_key_rotator.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'lib/gitlab/otp_key_rotator.rb')
-rw-r--r-- | lib/gitlab/otp_key_rotator.rb | 4 |
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 |