1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #21345: Don't evaluate callable settings in the debug page.

Thanks to crass for the report.
This commit is contained in:
Baptiste Mispelon
2013-10-29 23:06:59 +01:00
parent 8f73559823
commit 3c5cdaf47a
2 changed files with 14 additions and 0 deletions

View File

@@ -46,6 +46,10 @@ def cleanse_setting(key, value):
except TypeError:
# If the key isn't regex-able, just return as-is.
cleansed = value
if callable(cleansed):
cleansed.do_not_call_in_templates = True
return cleansed
def get_safe_settings():