mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
better sanitize jsonp
This commit is contained in:
parent
d7c93b0c0d
commit
f56936c936
2 changed files with 3 additions and 2 deletions
|
@ -18,7 +18,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)
|
||||
if(req.query.jsonp && isVarName(response))
|
||||
response = req.query.jsonp + "(" + response + ")";
|
||||
|
||||
res._____send(response);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue