From ff2f11a70612d84a4f7f54ee5433a5416662b683 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 24 Nov 2013 09:44:08 -0600 Subject: [PATCH] generic.jsonp raises HTTP(404) --- VERSION | 2 +- applications/welcome/views/generic.jsonp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d3cd1235..8d8ec349 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/applications/welcome/views/generic.jsonp b/applications/welcome/views/generic.jsonp index e0a20bcc..8b09fc2b 100644 --- a/applications/welcome/views/generic.jsonp +++ b/applications/welcome/views/generic.jsonp @@ -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))