Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
maizi20 opened this issue Oct 22, 2023 · 3 comments
Closed

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

maizi20 opened this issue Oct 22, 2023 · 3 comments
Labels
bug Something isn't working tracked This issue is now tracked on our internal backlog

Comments

@maizi20
Copy link

maizi20 commented Oct 22, 2023

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

@maizi20 maizi20 added the bug Something isn't working label Oct 22, 2023
@captainbrosset captainbrosset added the tracked This issue is now tracked on our internal backlog label Oct 23, 2023
@captainbrosset
Copy link
Contributor

Thanks a lot!

@sethbrenith
Copy link

Thanks for reporting! This bug is now fixed in V8, so the fix should be available in the upcoming version 121 of Edge and Chrome.

@captainbrosset
Copy link
Contributor

Pre-emptively closing this issue based on Seth's message (otherwise I'll forget and it will remain open forever 😄).
But feel free to re-open if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked This issue is now tracked on our internal backlog
Projects
None yet
Development

No branches or pull requests

3 participants