We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 492de92 commit e5296daCopy full SHA for e5296da
test/bad-url/test.ts
@@ -0,0 +1,16 @@
1
+import { assertEquals } from "jsr:@std/assert";
2
+
3
+const badUrls = [
4
+ "http://localhost:8080/wp-admin.php",
5
+ "http://localhost:8080/.well-known/appspecific/com.chrome.devtools.json",
6
+ "http://localhost:8080/.env",
7
+ "http://localhost:8080/[email protected]/../../../../../../../../../../etc/passwd?raw=1&module=1",
8
+];
9
10
+Deno.test("ban bad urls", async () => {
11
+ for (const url of badUrls) {
12
+ const res = await fetch(url);
13
+ await res.body?.cancel();
14
+ assertEquals(res.status, 404);
15
+ }
16
+});
0 commit comments