Skip to content

newyork-anthonyng/bracket-dot-notation-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Security: Bracket notation versus Dot notation

This demo project shows the security differences between bracket notation and dot notation in JavaScript.

Getting started

npm install

npm run start

🚨 Dot notation

Navigate to http://localhost:8000/dot?name=a,alert("hi").

The /dot route uses dot notation. Notice how it runs arbitrary JavaScript.

✅ Bracket notation

Navigate to http://localhost:8000/bracket?name=a,alert("hi").

The /bracket route uses bracket notation. Notice how it does not run arbitrary JavaScript.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages