mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
Warn about url shorteners being used
This commit is contained in:
parent
b9397733c3
commit
d0559f864e
1 changed files with 12 additions and 1 deletions
|
|
@ -44,7 +44,18 @@ https_enforcings = [
|
||||||
enforce_https('googlecode.com'),
|
enforce_https('googlecode.com'),
|
||||||
]
|
]
|
||||||
|
|
||||||
http_warnings = https_enforcings + [
|
|
||||||
|
def forbid_shortener(domain):
|
||||||
|
return (re.compile(r'https?://[^/]*' + re.escape(domain) + r'/.*'),
|
||||||
|
"URL shorteners should not be used")
|
||||||
|
|
||||||
|
http_url_shorteners = [
|
||||||
|
forbid_shortener('goo.gl'),
|
||||||
|
forbid_shortener('t.co'),
|
||||||
|
forbid_shortener('ur1.ca'),
|
||||||
|
]
|
||||||
|
|
||||||
|
http_warnings = https_enforcings + http_url_shorteners + [
|
||||||
(re.compile(r'.*github\.com/[^/]+/[^/]+\.git'),
|
(re.compile(r'.*github\.com/[^/]+/[^/]+\.git'),
|
||||||
"Appending .git is not necessary"),
|
"Appending .git is not necessary"),
|
||||||
# TODO enable in August 2015, when Google Code goes read-only
|
# TODO enable in August 2015, when Google Code goes read-only
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue