mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-09 06:06:13 +02:00
webaccess: Fix pad ID extraction for import and export paths
This commit is contained in:
parent
f4eae40c6b
commit
ed6fcefb67
@ -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…
x
Reference in New Issue
Block a user