Skip to content

Commit

Permalink
[api][webui] Update generation of secret token
Browse files Browse the repository at this point in the history
With this change OBS will use rake secret to generate it's secret token
for the rails app.
  • Loading branch information
bgeuken committed Apr 4, 2016
1 parent f032cb9 commit e7dd694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/obs-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ for i in production.rb ; do
done
SECRET_KEY="/srv/www/obs/api/config/secret.key"
if [ ! -e "$SECRET_KEY" ]; then
( umask 0077; dd if=/dev/urandom bs=256 count=1 2>/dev/null |sha256sum| cut -d\ -f 1 >$SECRET_KEY )
RAILS_ENV=production bundle exec rake secret > $SECRET_KEY
fi
chmod 0640 $SECRET_KEY
chown root.www $SECRET_KEY
Expand Down

0 comments on commit e7dd694

Please sign in to comment.