-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Currently our console.log and friends patchers assume that the call of obj.toString() is safe. That's demonstrably not the case if the objects logged are from an insecure foreign window (SecurityError Blocked a frame with origin "blah" from accessing a cross-origin frame.).
Example where we do this:
Should probably become something like this:
args.map((obj) => {
try {
return String(obj);
} catch (err) {
return '[object cannot be stringified]';
}
}).join(' ');Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Fields
Give feedbackNo fields configured for issues without a type.