generic.jsonp raises HTTP(404)
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.7.4-stable+timestamp.2013.11.23.21.48.35
|
||||
Version 2.7.4-stable+timestamp.2013.11.24.09.43.16
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
###
|
||||
# response._vars contains the dictionary returned by the controller action
|
||||
###
|
||||
|
||||
# security check! This file is an example for a jsonp view.
|
||||
# it is not safe to use as a generic.jsonp because of security implications.
|
||||
|
||||
if response.view == 'generic.jsonp':
|
||||
raise HTTP(501,'generic.jsonp diasbled for security reasons')
|
||||
|
||||
try:
|
||||
from gluon.serializers import json
|
||||
result = "%s(%s)" % (request.vars['callback'], json(response._vars))
|
||||
|
||||
Reference in New Issue
Block a user