mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-23 07:53:00 +01:00
fix: backport socket.io vulnerability fix
This commit is contained in:
@@ -123,7 +123,7 @@ async function onMessage(socket, payload) {
|
||||
const parts = eventName.toString().split('.');
|
||||
const namespace = parts[0];
|
||||
const methodToCall = parts.reduce((prev, cur) => {
|
||||
if (prev !== null && prev[cur]) {
|
||||
if (prev !== null && prev[cur] && (!prev.hasOwnProperty || prev.hasOwnProperty(cur))) {
|
||||
return prev[cur];
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user