aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authentication.py
diff options
context:
space:
mode:
authorXavier Ordoquy2014-11-26 16:36:56 +0100
committerXavier Ordoquy2014-11-26 16:36:56 +0100
commitf5e5ed0077cc477a7b8af98c7b10d8d3701f1a65 (patch)
tree252729a9e61deb0dbc1a098feb1c55eae56ca948 /rest_framework/authentication.py
parent311d315a739f4d1d02e87a09de0bbf9e7b0cee46 (diff)
parent2647e1aaaadfc2cfd947c633399dca1060c17401 (diff)
downloaddjango-rest-framework-f5e5ed0077cc477a7b8af98c7b10d8d3701f1a65.tar.bz2
Merge remote-tracking branch 'reference/master' into bugfix/1850
Diffstat (limited to 'rest_framework/authentication.py')
-rw-r--r--rest_framework/authentication.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py
index f3fec05e..36d74dd9 100644
--- a/rest_framework/authentication.py
+++ b/rest_framework/authentication.py
@@ -129,7 +129,7 @@ class SessionAuthentication(BaseAuthentication):
reason = CSRFCheck().process_view(request, None, (), {})
if reason:
# CSRF failed, bail with explicit error message
- raise exceptions.AuthenticationFailed('CSRF Failed: %s' % reason)
+ raise exceptions.PermissionDenied('CSRF Failed: %s' % reason)
class TokenAuthentication(BaseAuthentication):