diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-06-03 13:01:54 -0600 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-01-31 22:55:32 +0000 |
commit | caedc996bdb37718b8397988662835b3c8163e46 (patch) | |
tree | 41629ebbb4951be0b674b0019e1ecafd69567dd6 /app/models/pages_domain.rb | |
parent | b22c06d311525cbb9edc95ab99da26fa9b921395 (diff) | |
download | gitlab-ce-caedc996bdb37718b8397988662835b3c8163e46.tar.gz |
Adds algorithm to the pages domain key and remote mirror credentials encrypted attributes for forward compatibility with attr_encrypted 3.0.0.
aes-256-cbc is the default algorithm for attr_encrypted 1.x, but the default is changed in 3.0 and thus must be declared explicitly.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4216/ for more information. This will prevent OpenSSL errors once the code from that MR is merged into EE.
Diffstat (limited to 'app/models/pages_domain.rb')
-rw-r--r-- | app/models/pages_domain.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb index 9155e57331d..2f4cded15c8 100644 --- a/app/models/pages_domain.rb +++ b/app/models/pages_domain.rb @@ -10,7 +10,10 @@ class PagesDomain < ActiveRecord::Base validate :validate_matching_key, if: ->(domain) { domain.certificate.present? || domain.key.present? } validate :validate_intermediates, if: ->(domain) { domain.certificate.present? } - attr_encrypted :key, mode: :per_attribute_iv_and_salt, key: Gitlab::Application.secrets.db_key_base + attr_encrypted :key, + mode: :per_attribute_iv_and_salt, + key: Gitlab::Application.secrets.db_key_base, + algorithm: 'aes-256-cbc' after_create :update after_save :update |