prevent algorithm and key length issue for upgrades from an older GilLab version - 8.6 or earlier

This commit is contained in:
James Lopez 2016-07-20 12:08:52 +02:00
parent ef2edcc100
commit 457adb942c
1 changed files with 7 additions and 1 deletions

View File

@ -7,7 +7,13 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
class ProjectImportDataFake
extend AttrEncrypted
attr_accessor :credentials
attr_encrypted :credentials, key: Gitlab::Application.secrets.db_key_base, marshal: true, encode: true, :mode => :per_attribute_iv_and_salt
attr_encrypted :credentials,
key: Gitlab::Application.secrets.db_key_base,
marshal: true,
encode: true,
:mode => :per_attribute_iv_and_salt,
insecure_mode: true,
algorithm: 'aes-256-cbc'
end
def up