diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-02 02:32:30 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-02 05:24:59 -0700 |
commit | 61df812ac688cb0848752f9f26f77d65eadf160a (patch) | |
tree | 62306bb84db245047963109401a3202010711f3d /db | |
parent | fe0ebf76c49e2512b211c5d43152275c536f7e3a (diff) | |
download | gitlab-ce-61df812ac688cb0848752f9f26f77d65eadf160a.tar.gz |
Fix attr_encryption key settings
attr_encrypted does different things with `key` depending on what mode you are using:
1. In `:per_attribute_iv_and_salt` mode, it generates a hash with the salt:
https://github.com/attr-encrypted/encryptor/blob/c3a62c4a9e74686dd95e0548f9dc2a361fdc95d1/lib/encryptor.rb#L77.
There is no need to truncate the key to 32 bytes here.
2. In `:per_attribute_iv` mode, it sets the key directly to the password, so
truncation to 32 bytes is necessary.
Closes #47166
Diffstat (limited to 'db')
0 files changed, 0 insertions, 0 deletions