<160452715022.3053.4789663654831385299-0@git.sr.ht>
From: Alva <a@u8.is> --- srht/validation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srht/validation.py b/srht/validation.py index 5ff98cf..b42c8ef 100644 --- a/srht/validation.py +++ b/srht/validation.py @@ -152,8 +152,9 @@ class Validation: return value in self.source or value in self.files def valid_url(url): + allowed_schemes = ('http', 'https', 'gemini', 'gopher') try: u = parse.urlparse(url) - return bool(u.scheme and u.netloc and u.scheme in ['http', 'https']) + return bool(u.scheme and u.netloc and u.scheme in allowed_schemes) except: return False -- 2.26.2
<C6UTI06519FS.58V8LYU96859@cirno2>
<160452715022.3053.4789663654831385299-0@git.sr.ht>
(view parent)
core.sr.ht/patches: SUCCESS in 4m26s [Allow gemini and gopher URIs on profile][0] from [~alva][1] [0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/14726 [1]: a@u8.is ✓ #334951 SUCCESS core.sr.ht/patches/alpine.yml https://builds.sr.ht/~sircmpwn/job/334951 ✓ #334953 SUCCESS core.sr.ht/patches/debian.yml https://builds.sr.ht/~sircmpwn/job/334953 ✓ #334952 SUCCESS core.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/334952
<C6XZUWI1JFQE.3L1TX4G7ZNFBY@taiga>
<160452715022.3053.4789663654831385299-0@git.sr.ht>
(view parent)
Thanks! To git@git.sr.ht:~sircmpwn/core.sr.ht 8bedd6a..028eea9 master -> master
<20211228124426.GA8080@paksenarrion.paksenarrion.iveqy.com>
<C6XZUWI1JFQE.3L1TX4G7ZNFBY@taiga>
(view parent)
<20211228124432.GA8330@paksenarrion.paksenarrion.iveqy.com>
<C6XZUWI1JFQE.3L1TX4G7ZNFBY@taiga>
(view parent)