mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-02 12:54:03 +00:00
Block IPv6 unspecified feed URLs (#15)
This commit is contained in:
parent
9942ef8dc6
commit
73e2464b30
2 changed files with 2 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ describe("site probing helpers", () => {
|
|||
|
||||
it("blocks private SSRF targets", async () => {
|
||||
await expect(assertSafeHttpUrl("http://127.0.0.1/feed")).rejects.toThrow(/Blocked internal/);
|
||||
await expect(assertSafeHttpUrl("http://[::]/feed")).rejects.toThrow(/Blocked internal/);
|
||||
await expect(assertSafeHttpUrl("http://[::ffff:192.168.1.10]/feed")).rejects.toThrow(/Blocked internal/);
|
||||
await expect(assertSafeHttpUrl("file:///etc/passwd")).rejects.toThrow(/Unsupported URL protocol/);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue