Construct a middleware without a get_response function is deprecated and will not work in a future release.
Signed-off-by: Yohann D'ANELLO <ynerant@¢rans.org> Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
d62def6d6b
commit
251cfb9b49
1 changed files with 2 additions and 1 deletions
|
@ -288,7 +288,8 @@ class FederateAuth(CsrfExemptView):
|
|||
# else, a User is trying to log in using an identity provider
|
||||
except FederatedIendityProvider.DoesNotExist:
|
||||
# Manually checking for csrf to protect the code below
|
||||
reason = CsrfViewMiddleware().process_view(request, None, (), {})
|
||||
reason = CsrfViewMiddleware(lambda request: HttpResponse()) \
|
||||
.process_view(request, None, (), {})
|
||||
if reason is not None: # pragma: no cover (csrf checks are disabled during tests)
|
||||
return reason # Failed the test, stop here.
|
||||
form = forms.FederateSelect(request.POST)
|
||||
|
|
Loading…
Reference in a new issue