mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-06 01:43:48 +00:00
Prevent rogue users from requesting multiple roomKeys
This commit is contained in:
1
index.js
1
index.js
@@ -231,6 +231,7 @@ class PairDropServer {
|
||||
_onPairDeviceInitiate(sender) {
|
||||
let roomSecret = this.getRandomString(64);
|
||||
let roomKey = this._createRoomKey(sender, roomSecret);
|
||||
if (sender.roomKey) this._removeRoomKey(sender.roomKey);
|
||||
sender.roomKey = roomKey;
|
||||
this._send(sender, {
|
||||
type: 'pair-device-initiated',
|
||||
|
||||
Reference in New Issue
Block a user