Skip to content

In DevTools,the reading of the splice attribute can be detected #193

Closed
@maizi20

Description

@maizi20

When the developer tool opens, it automatically reads the 'splice' property of most object types on the console and triggers the getter.

This feature can be used for interference with developer tools and can not be prevented by scripting.

For example:

console.log({
   get splice(){
     location.replace('about:blank')
     //If the console is already open, the splice property of this object will be read and redirected to an empty page.


   }
})

A similar problem exists with the code debugger:

!function(){
  var o={get splice(){location.replace('about:blank')}};
  debugger //When you debug here, redirection is triggered by reading the splice property to the object in scope.
}()

(There is no such bug in Firefox.)

AB#47199348

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtrackedThis issue is now tracked on our internal backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions