Skip to content

update gitlab shell secret file also when it is empty

username-removed-163557 requested to merge glensc/gitlab-ce:patch-4 into master

use File.size? instead of File.exist? so that secret token is generated when the file is empty.

(see this SO post for longer explanation)


i'm packaging gitlab-ce and package contains empty file (so the file permissions would be correct, but allow per installation random content)

aside, this solution could be also used for troubleshooting, as simple way to regenerate the secret key (in case it was leaked or whatever reason) leaving file permissions correct:

# > .gitlab_shell_secret
# gitlab-rake reconfigure

Merge request reports