mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Do not create world-readable secret file by default
This commit is contained in:
@@ -35,6 +35,8 @@ else:
|
||||
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
|
||||
SECRET_KEY = get_random_string(50, chars)
|
||||
with open(SECRET_FILE, 'w') as f:
|
||||
os.chmod(SECRET_FILE, 0o600)
|
||||
os.chown(SECRET_FILE, os.getuid(), os.getgid())
|
||||
f.write(SECRET_KEY)
|
||||
|
||||
# Adjustable settings
|
||||
|
||||
Reference in New Issue
Block a user