From dd70c9441c950a91c38687931aa2b8b6b597a0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 13 May 2015 13:05:42 +0200 Subject: [PATCH] Detect most bad URLs Also [appid] links that should really be [[appid]] --- fdroidserver/metadata.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index 2e29cd79..0bf9f602 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -339,6 +339,8 @@ class DescriptionFormatter: else: urltxt = url[index2 + 1:] url = url[:index2] + if ':' not in url: + raise MetaDataException("'%s' doesn't look like an URL" % url) linkified_html += '' + cgi.escape(urltxt) + '' linkified_plain += urltxt if urltxt != url: