summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-10-13 10:04:58 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-10-13 10:04:58 +0200
commitcfd0d66c8308c0f259e39322193c8ddb34ec28f9 (patch)
treee930f70e46285ecf56526d412f04c1f900924db1
parent21e3712a07987f0a58282daf58f3e6aa66dd68fc (diff)
downloadgitlab-ce-fix/reassign-secret-token-on-generate.tar.gz
Reassign secret token when regenerating onefix/reassign-secret-token-on-generate
-rw-r--r--lib/gitlab/backend/shell.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb
index d0060fbaca1..9cec71a3222 100644
--- a/lib/gitlab/backend/shell.rb
+++ b/lib/gitlab/backend/shell.rb
@@ -47,8 +47,8 @@ module Gitlab
unless File.size?(secret_file)
# Generate a new token of 16 random hexadecimal characters and store it in secret_file.
- token = SecureRandom.hex(16)
- File.write(secret_file, token)
+ @secret_token = SecureRandom.hex(16)
+ File.write(secret_file, @secret_token)
end
link_path = File.join(shell_path, '.gitlab_shell_secret')