mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
fix: correct destructuring of user object to enhance security in SEA
This commit is contained in:
parent
af2fbf7ccd
commit
8f344d03b0
@ -140,7 +140,7 @@
|
||||
|
||||
// Localize some opt props, and delete the original refs to prevent possible attacks
|
||||
const opt = (msg._.msg || {}).opt || {}
|
||||
const authenticator = opt.authenticator || (user._).sea;
|
||||
const authenticator = opt.authenticator || (user._ || {}).sea;
|
||||
const upub = opt.authenticator ? (opt.pub || (user.is || {}).pub || pub) : (user.is || {}).pub;
|
||||
const cert = opt.cert;
|
||||
delete opt.authenticator; delete opt.pub;
|
||||
|
Loading…
x
Reference in New Issue
Block a user