mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
Print a console warning for users using a clear text ADMIN_PASSWORD
This commit is contained in:
parent
999df67a96
commit
ae724a91e7
1 changed files with 9 additions and 0 deletions
|
@ -52,6 +52,15 @@ def configure():
|
||||||
if not 'MAIL_DEFAULT_SENDER' in app.config:
|
if not 'MAIL_DEFAULT_SENDER' in app.config:
|
||||||
app.config['MAIL_DEFAULT_SENDER'] = DEFAULT_MAIL_SENDER
|
app.config['MAIL_DEFAULT_SENDER'] = DEFAULT_MAIL_SENDER
|
||||||
|
|
||||||
|
if "pbkdf2:sha256:" not in app.config['ADMIN_PASSWORD'] and app.config['ADMIN_PASSWORD']:
|
||||||
|
# Since v1.1
|
||||||
|
warnings.warn(
|
||||||
|
"You are using an unhashed ADMIN_PASSWORD, which is not supported anymore"
|
||||||
|
+" for safety reasons. Please follow the instructions in the installation"
|
||||||
|
+" documentation to update to a safer password mechanism.",
|
||||||
|
UserWarning
|
||||||
|
)
|
||||||
|
|
||||||
configure()
|
configure()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue