mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Prevent rogue users from requesting multiple roomKeys
This commit is contained in:
parent
c9f57c6fa0
commit
67273bc418
1 changed files with 1 additions and 0 deletions
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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue