aboutsummaryrefslogtreecommitdiffhomepage
path: root/url
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2020-01-02 11:03:03 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2020-01-02 11:03:51 -0800
commitac3c936820033f27e32c9a4490f2f33d6ffd6b05 (patch)
treee317c3b87fd2314467d8931eb84cd5fa51c2fd7c /url
parent08fc32b0e14cccb46819976f213678e2b68f5b02 (diff)
Make sure whitelisted URI schemes are handled properly by the sanitizer
Diffstat (limited to 'url')
-rw-r--r--url/url_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/url/url_test.go b/url/url_test.go
index 54868a9..56b6e13 100644
--- a/url/url_test.go
+++ b/url/url_test.go
@@ -13,6 +13,8 @@ func TestAbsoluteURL(t *testing.T) {
[]string{"https://example.org/path/file.ext", "https://example.org/folder", "path/file.ext"},
[]string{"https://example.org/path/file.ext", "https://example.org/folder/", "https://example.org/path/file.ext"},
[]string{"https://static.example.org/path/file.ext", "https://www.example.org/", "//static.example.org/path/file.ext"},
+ []string{"magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a", "https://www.example.org/", "magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a"},
+ []string{"magnet:?xt.1=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C&xt.2=urn:sha1:TXGCZQTH26NL6OUQAJJPFALHG2LTGBC7", "https://www.example.org/", "magnet:?xt.1=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C&xt.2=urn:sha1:TXGCZQTH26NL6OUQAJJPFALHG2LTGBC7"},
}
for _, scenario := range scenarios {