fix(security): require https for trusted links
This commit is contained in:
1 parent
4e5af2b45f
commit
2ab001b18a
3 files changed
+15
-2
No files matched your search
@@ -17,6 +17,7 @@ describe("external URL policy", () => {
|
||||
|
||||
it("separates trusted hosts from confirmation hosts", () => {
|
||||
expect(classifyExternalUrl("https://github.com/acme/repo")).toMatchObject({ kind: "trusted", host: "github.com" });
|
||||
expect(classifyExternalUrl("http://github.com/acme/repo")).toMatchObject({ kind: "confirm", host: "github.com" });
|
||||
expect(classifyExternalUrl("https://example.com/report")).toMatchObject({ kind: "confirm", host: "example.com" });
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user