mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-14 11:06:55 -04:00
Added sanitization to API logic
This commit is contained in:
parent
4a43fd7ecb
commit
c44b6eabdd
1 changed files with 2 additions and 2 deletions
|
@ -331,12 +331,12 @@ exports.createPad = function(padID, text, callback)
|
||||||
callback(new customError("createPad can't create group pads","apierror"));
|
callback(new customError("createPad can't create group pads","apierror"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
padID = padID.replace(/[^a-z0-9_\-]/gi, '_');
|
||||||
//create pad
|
//create pad
|
||||||
getPadSafe(padID, false, text, function(err)
|
getPadSafe(padID, false, text, function(err)
|
||||||
{
|
{
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
callback();
|
callback(null, {padID: padID});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue