You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
""" SECRET_KEY = "#n38c)phqy1^2qhv8pk18i_3v9b%#n+*y__@611$a+s#$&a4ao" # if an app is included in SESSION_CONFIGS, you don"t need to list it here INSTALLED_APPS = ["otree"] #DATABASE_URL = "postgres://postgres@localhost/django_db" #REDIS_URL = "redis://localhost:6379"
Apps
effort Separate players based on real effort task and gender into groups competing against each other
Veronika ""\n
Last updated
2020-11-03
Notice the secret key is shown as if it was part of DEMO_PAGE_INTRO_HTML setting.
Again the SECRET_KEY is visible and following lines too
Click "browse source code"
Click "settings.py"
The file currently ends as follows:
...
#OTREE_AUTH_LEVEL = "STUDY"ADMIN_USERNAME="admin"# for security, best to set admin password in an environment variableADMIN_PASSWORD=environ.get("OTREE_ADMIN_PASSWORD")
DEMO_PAGE_INTRO_HTML=""" """SECRET_KEY="#n38c)phqy1^2qhv8pk18i_3v9b%#n+*y__@611$a+s#$&a4ao"# if an app is included in SESSION_CONFIGS, you don"t need to list it hereINSTALLED_APPS= ["otree"]
#DATABASE_URL = "postgres://postgres@localhost/django_db"#REDIS_URL = "redis://localhost:6379""""environ["DATABASE_URL"] = "postgres://postgres@localhost/django_db"environ["REDIS_URL"] = "redis://localhost:6379"environ["OTREE_ADMIN_PASSWORD"] = "odraSe5ku"environ["OTREE_AUTH_LEVEL"] = "STUDY" STATICFILES_DIRS = [os.path.join(BASE_DIR, "static/effort/data")]STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')STATIC_URL = "/static/" """ifenviron.get('OTREE_PRODUCTION') notin {None, '', '0'}:
DEBUG=Falseelse:
DEBUG=Trueenviron["OTREE_AUTH_LEVEL"] ="STUDY"environ["OTREE_ADMIN_PASSWORD"] ="odraSe5ku"PRODUCTION=1
Notice the line DEMO_PAGE_INTRO_HTML = """ """ sets the description to a single space.
Notice the text shown continues to the start of a multi-line string (being used as a comment).
I suspect that oTree Hub is somehow parsing settings.py to try to pull out the value, and this corner case of a triple-quoted string on a single-line breaks it - and it continues taking text until the next triple-quote.
The text was updated successfully, but these errors were encountered:
On Sep 24, 2021, at 6:38 AM, Peter Cock ***@***.***> wrote:
(This isn't a serious security issue because by design the SECRET_KEY is visible anyway by downloading or browsing the source code)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
There doesn't seem to be a search option, so the page number may change...
DEMO_PAGE_INTRO_HTML
setting.DEMO_PAGE_INTRO_HTML = """ """
sets the description to a single space.settings.py
to try to pull out the value, and this corner case of a triple-quoted string on a single-line breaks it - and it continues taking text until the next triple-quote.The text was updated successfully, but these errors were encountered: