git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
return 403 if csrf is not OK with our custom view
[unfold.git]
/
engine
/
manifoldproxy.py
diff --git
a/engine/manifoldproxy.py
b/engine/manifoldproxy.py
index
1d629c7
..
52c747f
100644
(file)
--- a/
engine/manifoldproxy.py
+++ b/
engine/manifoldproxy.py
@@
-7,7
+7,7
@@
import json
# this is for django objects only
#from django.core import serializers
import json
# this is for django objects only
#from django.core import serializers
-from django.http import HttpResponse
+from django.http import HttpResponse
, HttpResponseForbidden
# xxx should probably cater for
# format_in : how is the query encoded in POST
# xxx should probably cater for
# format_in : how is the query encoded in POST
@@
-34,4
+34,4
@@
def api (request,format):
failure_answer=[ "csrf_failure" ]
def csrf_failure(request, reason=""):
print "CSRF failure with reason '%s'"%reason
failure_answer=[ "csrf_failure" ]
def csrf_failure(request, reason=""):
print "CSRF failure with reason '%s'"%reason
- return HttpResponseForbidden (json.dump (failure_answer), mimetype="application/json")
+ return HttpResponseForbidden (json.dump
s
(failure_answer), mimetype="application/json")