Reassign secret token when regenerating one

This commit is contained in:
Grzegorz Bizon 2016-10-13 10:04:58 +02:00
parent 21e3712a07
commit cfd0d66c83
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ module Gitlab
unless File.size?(secret_file) unless File.size?(secret_file)
# Generate a new token of 16 random hexadecimal characters and store it in secret_file. # Generate a new token of 16 random hexadecimal characters and store it in secret_file.
token = SecureRandom.hex(16) @secret_token = SecureRandom.hex(16)
File.write(secret_file, token) File.write(secret_file, @secret_token)
end end
link_path = File.join(shell_path, '.gitlab_shell_secret') link_path = File.join(shell_path, '.gitlab_shell_secret')