From 8588b89efff3ffd3c2540d5b11af65a2f6c2e187 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 4 Dec 2017 20:28:57 +0100 Subject: [PATCH 1/4] lint: add more VCS HTTPS checks I manually checked that these work with HTTPS. fdroiddata!2710 should fix all of these issues. --- fdroidserver/lint.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index beaf097a..66b66245 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -42,7 +42,15 @@ https_enforcings = [ enforce_https('bitbucket.org'), enforce_https('apache.org'), enforce_https('google.com'), + enforce_https('git.code.sf.net'), enforce_https('svn.code.sf.net'), + enforce_https('anongit.kde.org'), + enforce_https('savannah.nongnu.org'), + enforce_https('git.savannah.nongnu.org'), + enforce_https('download.savannah.nongnu.org'), + enforce_https('savannah.gnu.org'), + enforce_https('git.savannah.gnu.org'), + enforce_https('download.savannah.gnu.org'), ] From 42a983353691790840dd28de3cfa5dbebd6f1365 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 4 Dec 2017 20:33:42 +0100 Subject: [PATCH 2/4] lint: switch links to plain URLS rather than mediawiki syntax fdroidclient#1000 --- fdroidserver/lint.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 66b66245..b5355359 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -116,10 +116,6 @@ regex_checks = { _("Unnecessary leading space")), (re.compile(r'.*\s$'), _("Unnecessary trailing space")), - (re.compile(r'.*([^[]|^)\[[^:[\]]+( |\]|$)'), - _("Invalid link - use [http://foo.bar Link title] or [http://foo.bar]")), - (re.compile(r'(^|.* )https?://[^ ]+'), - _("Unlinkified link - use [http://foo.bar Link title] or [http://foo.bar]")), ], } From 05616b33a77d7449753f88498d6b68b56444dfba Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 4 Dec 2017 20:34:13 +0100 Subject: [PATCH 3/4] lint: enforce HTTPS and shortener ban in descriptions as well --- fdroidserver/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index b5355359..31922585 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -109,7 +109,7 @@ regex_checks = { (re.compile(r'.*\s$'), _("Unnecessary trailing space")), ], - 'Description': [ + 'Description': https_enforcings + http_url_shorteners + [ (re.compile(r'\s*[*#][^ .]'), _("Invalid bulleted list")), (re.compile(r'^\s'), From b31239803a164bd7e4faee9c97f225f06ed795f7 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 4 Dec 2017 20:54:06 +0100 Subject: [PATCH 4/4] lint: greatly expand the list of link shorteners to ban Since we are now getting credit for fighting trackers, might as well step up the fight! gleaned from these sources: * https://bit.do/list-of-url-shorteners.php * https://www.hashtags.org/featured/list-of-url-shorteners/ * http://l-lists.com/en/lists/gvaoif.html --- fdroidserver/lint.py | 54 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 31922585..18bd3d47 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -60,13 +60,59 @@ def forbid_shortener(domain): http_url_shorteners = [ - forbid_shortener('goo.gl'), - forbid_shortener('t.co'), - forbid_shortener('ur1.ca'), - forbid_shortener('is.gd'), + forbid_shortener('1url.com'), + forbid_shortener('adf.ly'), + forbid_shortener('bc.vc'), + forbid_shortener('bit.do'), forbid_shortener('bit.ly'), + forbid_shortener('bitly.com'), + forbid_shortener('budurl.com'), + forbid_shortener('buzurl.com'), + forbid_shortener('cli.gs'), + forbid_shortener('cur.lv'), + forbid_shortener('cutt.us'), + forbid_shortener('db.tt'), + forbid_shortener('filoops.info'), + forbid_shortener('goo.gl'), + forbid_shortener('is.gd'), + forbid_shortener('ity.im'), + forbid_shortener('j.mp'), + forbid_shortener('l.gg'), + forbid_shortener('lnkd.in'), + forbid_shortener('moourl.com'), + forbid_shortener('ow.ly'), + forbid_shortener('para.pt'), + forbid_shortener('po.st'), + forbid_shortener('q.gs'), + forbid_shortener('qr.ae'), + forbid_shortener('qr.net'), + forbid_shortener('rdlnk.com'), + forbid_shortener('scrnch.me'), + forbid_shortener('short.nr'), + forbid_shortener('sn.im'), + forbid_shortener('snipurl.com'), + forbid_shortener('su.pr'), + forbid_shortener('t.co'), forbid_shortener('tiny.cc'), + forbid_shortener('tinyarrows.com'), forbid_shortener('tinyurl.com'), + forbid_shortener('tr.im'), + forbid_shortener('tweez.me'), + forbid_shortener('twitthis.com'), + forbid_shortener('twurl.nl'), + forbid_shortener('tyn.ee'), + forbid_shortener('u.bb'), + forbid_shortener('u.to'), + forbid_shortener('ur1.ca'), + forbid_shortener('urlof.site'), + forbid_shortener('v.gd'), + forbid_shortener('vzturl.com'), + forbid_shortener('x.co'), + forbid_shortener('xrl.us'), + forbid_shortener('yourls.org'), + forbid_shortener('zip.net'), + forbid_shortener('✩.ws'), + forbid_shortener('➡.ws'), ] http_checks = https_enforcings + http_url_shorteners + [