Adds `constructor`

`constructor` is the only lowercase identifier that is `in` all JavaScript objects, and can be involved in obscure XSS so can be used to abuse code that uses JavaScript objects as lookup tables.

```js
var empty = {};
if ('constuctor' in empty && empty['constructor']) {
  // runs
}
empty['constructor']['constructor']('alert(1)')();  // Parses and runs 
```
master
Mike Samuel 2019-02-22 13:29:07 -05:00 committed by GitHub
parent f56ff6ea82
commit 71a3013953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ FALSE
None
hasOwnProperty
then
constructor
\
\\