aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_metadata.py
diff options
context:
space:
mode:
authorDanilo Bargen2014-06-02 00:41:58 +0200
committerDanilo Bargen2014-09-23 14:16:08 +0200
commitb187f53453d3885cd918f5f9f4490bcc8e3e2410 (patch)
treee7c44584ebbd6e39736a8e782df5730cb6052422 /tests/test_metadata.py
parent5d80f7f932bfcc0630ac0fdbf07072a53197b98f (diff)
downloaddjango-rest-framework-b187f53453d3885cd918f5f9f4490bcc8e3e2410.tar.bz2
Changed return status for CSRF failures to HTTP 403
By default, Django returns "HTTP 403 Forbidden" responses when CSRF validation failed[1]. CSRF is a case of authorization, not of authentication. Therefore `PermissionDenied` should be raised instead of `AuthenticationFailed`. [1] https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#rejected-requests
Diffstat (limited to 'tests/test_metadata.py')
0 files changed, 0 insertions, 0 deletions