mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
padurlsanitize: early return, no functional changes
This commit is contained in:
parent
d19436d044
commit
391bd79e03
1 changed files with 19 additions and 20 deletions
|
@ -8,9 +8,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
if(!padManager.isValidPadId(padId) || /\/$/.test(req.url))
|
||||
{
|
||||
res.status(404).send('Such a padname is forbidden');
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
padManager.sanitizePadId(padId, function(sanitizedPadId) {
|
||||
//the pad id was sanitized, so we redirect to the sanitized version
|
||||
if(sanitizedPadId != padId)
|
||||
|
@ -28,6 +28,5 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
next();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue