mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
webaccess: Fix pad ID extraction for import and export paths
This commit is contained in:
parent
f4eae40c6b
commit
ed6fcefb67
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ exports.checkAccess = (req, res, next) => {
|
|||
if (!level) return fail();
|
||||
const user = req.session.user;
|
||||
if (user == null) return next(); // This will happen if authentication is not required.
|
||||
const encodedPadId = (req.path.match(/^\/p\/(.*)$/) || [])[1];
|
||||
const encodedPadId = (req.path.match(/^\/p\/([^/]*)/) || [])[1];
|
||||
if (encodedPadId == null) return next();
|
||||
const padId = decodeURIComponent(encodedPadId);
|
||||
// The user was granted access to a pad. Remember the authorization level in the user's
|
||||
|
|
Loading…
Reference in a new issue