Reassign secret token when regenerating one
This commit is contained in:
parent
21e3712a07
commit
cfd0d66c83
|
|
@ -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')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue