mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
PadMessageHandler: prohibit reading of message.data.padId
This commit is contained in:
parent
32c82917e3
commit
1d395bf70b
1 changed files with 6 additions and 0 deletions
|
@ -250,6 +250,12 @@ exports.handleMessage = async (socket, message) => {
|
||||||
throw new Error('message.padId must not be accessed (for security reasons)');
|
throw new Error('message.padId must not be accessed (for security reasons)');
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
if (message.data) {
|
||||||
|
Object.defineProperty(message.data, 'padId', {get: () => {
|
||||||
|
throw new Error('message.data.padId must not be accessed (for security reasons)');
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
|
||||||
const auth = thisSession.auth;
|
const auth = thisSession.auth;
|
||||||
if (!auth) {
|
if (!auth) {
|
||||||
const ip = settings.disableIPlogging ? 'ANONYMOUS' : (socket.request.ip || '<unknown>');
|
const ip = settings.disableIPlogging ? 'ANONYMOUS' : (socket.request.ip || '<unknown>');
|
||||||
|
|
Loading…
Reference in a new issue