https://www.example.com:80
origin = scheme + host + port
http://www.example.com:80 https://api.example.com:443
site = private_domain + public_suffix
Blocks resource requests to/from an external site
“External” is based on SOP: only requests from the same origin
are allowed to use the resources
more secure but how people bypassed it isn’t xd
read more here
Obviously sometimes you need to access resources from another origin (e.g. using images, videos)
This can be achieved if the resource owner sets certain headers on the resource (more here)
<s>
?Cool graphic?
different ones have different props, etc
<div></div>
<img src=.../>
<script>...</script>
a better name is Javascript Injection
<script>
const pos = document.URL.indexOf("context=") + 8;
document.write(document.URL.substring(pos, document.URL.length));
</script>
<script>
tags// event-handlers
<img src=x onerror=alert(1)/>
// injecting into javascript code
const a = '<user_input>'
// and much more
it’s any time you get user supplied input in a javascript context
<SCRscriptIPT>
<ScRiPt>
<img onerror=...>
<body onload=...>
<form method="POST" >
a fake form sitting under a real form
if you try to interact with the fake form, you’ll accidentally interact with the real one.
this could be either local, or external