Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add browsertest for cross-origin .onion requests.
- Loading branch information
Showing
10 changed files
with
272 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
HTTP/1.1 200 OK | ||
Cache-Control: no-store | ||
Content-Type: image/png | ||
Access-Control-Allow-Origin: * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<html> | ||
<head> | ||
</head> | ||
<body> | ||
<p><form id="form" method="post" action=""> | ||
<input type="submit"> | ||
</form></p> | ||
<p>Waiting for JS form submission...</p> | ||
<script> | ||
function redirectToDestination() { | ||
const urlParams = new URLSearchParams(window.location.search); | ||
const url = urlParams.get('url'); | ||
let form = document.getElementById("form"); | ||
form.action = atob(url); | ||
form.submit(); | ||
} | ||
setTimeout(redirectToDestination, 100); | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<html> | ||
<head> | ||
</head> | ||
<body> | ||
<img id="image1" src="" title="image1"> | ||
<img id="image2" src="" title="image2c" crossorigin="anonymous"> | ||
<img id="image3" src="" title="image3r"> | ||
<img id="image4" src="" title="image4rc" crossorigin="anonymous"> | ||
<br> | ||
<img id="image5" src="" title="image5x"> | ||
<img id="image6" src="" title="image6xc" crossorigin="anonymous"> | ||
<img id="image7" src="" title="image7xr"> | ||
<img id="image8" src="" title="image8xrc" crossorigin="anonymous">> | ||
<script> | ||
const url = new URL(document.location); | ||
|
||
// Same-origin images | ||
let image1 = document.getElementById("image1"); | ||
image1.src = "https://" + url.host + "/logo-referrer.png?1"; | ||
let image2 = document.getElementById("image2"); | ||
image2.src = "https://" + url.host + "/logo-referrer.png?2"; | ||
let image3 = document.getElementById("image3"); | ||
image3.src = "https://" + url.host + "/cross-site/" + url.hostname + "/logo-referrer.png?3"; | ||
let image4 = document.getElementById("image4"); | ||
image4.src = "https://" + url.host + "/cross-site/" + url.hostname + "/logo-referrer.png?4"; | ||
|
||
// Cross-origin images | ||
let image5 = document.getElementById("image5"); | ||
image5.src = "https://a.com:" + url.port + "/logo-referrer.png?5"; | ||
let image6 = document.getElementById("image6"); | ||
image6.src = "https://a.com:" + url.port + "/logo-referrer.png?6"; | ||
let image7 = document.getElementById("image7"); | ||
image7.src = "https://" + url.host + "/cross-site/a.com/logo-referrer.png?7"; | ||
let image8 = document.getElementById("image8"); | ||
image8.src = "https://" + url.host + "/cross-site/a.com/logo-referrer.png?8"; | ||
|
||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<html> | ||
<body> | ||
<p>Referrer (JS): <code id="referrer"></code></p> | ||
<script> | ||
var referrer = document.getElementById("referrer"); | ||
referrer.innerText = document.referrer; | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
HTTP/1.1 200 OK | ||
Cache-Control: no-store | ||
Content-Type: text/html |