diff options
| author | Rémy Coutable <remy@rymai.me> | 2017-11-27 16:58:12 +0100 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2017-11-27 18:09:46 +0100 |
| commit | fa35ea13873f81405c5203f0827ea15703615c97 (patch) | |
| tree | 2e0049dcf86d139567dfd2ac6e8d88eb0261e40f /app/models/concerns | |
| parent | 24fadd7c3d0a8f643e9df1c7ae3c1c7e88e8592e (diff) | |
| download | gitlab-ce-fa35ea13873f81405c5203f0827ea15703615c97.tar.gz | |
Strip leading & trailing whitespaces in CI/CD secret variable keys40561-environment-scope-value-is-not-trimmed
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/concerns')
| -rw-r--r-- | app/models/concerns/has_variable.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/concerns/has_variable.rb b/app/models/concerns/has_variable.rb index 9585b5583dc..8a241e4374a 100644 --- a/app/models/concerns/has_variable.rb +++ b/app/models/concerns/has_variable.rb @@ -16,6 +16,10 @@ module HasVariable key: Gitlab::Application.secrets.db_key_base, algorithm: 'aes-256-cbc' + def key=(new_key) + super(new_key.to_s.strip) + end + def to_runner_variable { key: key, value: value, public: false } end |
