﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24868	Invalid kwarg passed to technical_500_response() handling SuspiciousOperation in debug mode	andrewhayes1979	nobody	"
Version: 1.8.2
File: django/core/handlers/base.py
Line: 206

...if in debug mode, and a suspicious operation is raised, the following code gets executed:

{{{
            if settings.DEBUG:
                return debug.technical_500_response(request, *sys.exc_info(), status_code=400)
}}}

...this causes the technical_500_response() function to throw a further exception because it's not expecting a ""status_code"" keyword argument.

Though I appreciate that SuspiciousOperation shouldn't really be thrown by user code (only by Django in production in relation to ALLOWED_HOSTS issues -- the code that uncovered this has since been modified), the error still needs addressing, whether in the code above, or amending in technical_debug_response() to accept status_code as a keyword argument.
"	Bug	closed	Core (URLs)	1.8	Normal	invalid	technical_500_response suspiciousoperation		Unreviewed	0	0	0	0	1	0
