#36716: Debugging can get stuck in an infinite loop if a setting is contained in
itself
-------------------------------------+-------------------------------------
Reporter: Willem Van Onsem | Type:
| Uncategorized
Status: new | Component: Core
| (Other)
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Django can get stuck in an infinite loop when cleansing settings.
Indeed, imagine we have a setting:
{{{
MY_SETTING = []
MY_SETTING.append(MY_SETTING)
}}}
If we now visit a page that raises an error, and Django starts the
debugging process, it will get stuck in infinite recursion.
while it might look a bit odd that settings can contain themself, it
renders the server unresponsive when an error happens and we run it in
debug.
We can for cleansing add a list of visited `id(..)`s of the settings, and
if visited a second time, block the rendering.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36716>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.