mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-31 13:08:15 +00:00
fix: use server-trusted peerId in relay payload to prevent spoofing
This commit is contained in:
+1
-1
@@ -503,7 +503,7 @@ io.on('connection', (socket) => {
|
|||||||
mediaTitle: clamp(data.mediaTitle, 100),
|
mediaTitle: clamp(data.mediaTitle, 100),
|
||||||
volume: clampNum(data.volume, 0, 1),
|
volume: clampNum(data.volume, 0, 1),
|
||||||
muted: validBool(data.muted),
|
muted: validBool(data.muted),
|
||||||
peerId: typeof data.peerId === 'string' ? data.peerId.substring(0, 16) : undefined,
|
peerId: mapping.peerId,
|
||||||
status: typeof data.status === 'string' ? data.status.substring(0, 16) : undefined,
|
status: typeof data.status === 'string' ? data.status.substring(0, 16) : undefined,
|
||||||
expectedTitle: clamp(data.expectedTitle, 100),
|
expectedTitle: clamp(data.expectedTitle, 100),
|
||||||
title: clamp(data.title, 100),
|
title: clamp(data.title, 100),
|
||||||
|
|||||||
Reference in New Issue
Block a user