summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2018-02-08 16:19:04 +0000
committerGitHub <noreply@github.com>2018-02-08 16:19:04 +0000
commitf8e7a24f5ef99faa7972b4192a6d5b51a4860360 (patch)
treecbf1db684bc50e825dfcd8471fd2a268107b80cd
parent0c9475e366622e784737f6bdaec14c00bd0765d7 (diff)
parenta2992b3624ba283b56877ab70a3e2226ed7a8125 (diff)
downloadetherpad-lite-f8e7a24f5ef99faa7972b4192a6d5b51a4860360.zip
Merge pull request #3321 from mmosemmle/jsonp_fix
Fix jsonp checking
-rw-r--r--src/node/hooks/express/apicalls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/hooks/express/apicalls.js b/src/node/hooks/express/apicalls.js
index 4482fd84..009a93d7 100644
--- a/src/node/hooks/express/apicalls.js
+++ b/src/node/hooks/express/apicalls.js
@@ -19,7 +19,7 @@ var apiCaller = function(req, res, fields) {
apiLogger.info("RESPONSE, " + req.params.func + ", " + response);
//is this a jsonp call, if yes, add the function call
- if(req.query.jsonp && isVarName(response))
+ if(req.query.jsonp && isVarName(req.query.jsonp))
response = req.query.jsonp + "(" + response + ")";
res._____send(response);