mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
better safe Flask example
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
"""Flask App configuration."""
|
||||
import os
|
||||
|
||||
# General Config
|
||||
FLASK_DEBUG = True
|
||||
SECRET_KEY = "CHANGEME5"
|
||||
if SECRET_KEY == "CHANGEME5":
|
||||
# if we are loading SECRET_KEY from config files then
|
||||
# it is good to check default value always, maybe
|
||||
# the user responsible for setup the application make a mistake
|
||||
# and has not changed the default SECRET_KEY value
|
||||
SECRET_KEY = os.getenv('envKey') # A_CONSTANT_SECRET
|
||||
if SECRET_KEY == "A_CONSTANT_SECRET":
|
||||
raise "not possible"
|
||||
|
||||
Reference in New Issue
Block a user