1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-17 18:50:11 +02:00

Merge branch 'lint_fix' into 'master'

lint: fix update check data https check

See merge request fdroid/fdroidserver!473
This commit is contained in:
Marcus 2018-03-02 22:59:26 +00:00
commit 654b3cb9dc

View File

@ -214,11 +214,12 @@ def check_update_check_data_url(app):
if app.UpdateCheckData: if app.UpdateCheckData:
urlcode, codeex, urlver, verex = app.UpdateCheckData.split('|') urlcode, codeex, urlver, verex = app.UpdateCheckData.split('|')
for url in (urlcode, urlver): for url in (urlcode, urlver):
parsed = urllib.parse.urlparse(url) if url != '.':
if not parsed.scheme or not parsed.netloc: parsed = urllib.parse.urlparse(url)
yield _('UpdateCheckData not a valid URL: {url}').format(url=url) if not parsed.scheme or not parsed.netloc:
if parsed.scheme != 'https': yield _('UpdateCheckData not a valid URL: {url}').format(url=url)
yield _('UpdateCheckData must use HTTPS URL: {url}').format(url=url) if parsed.scheme != 'https':
yield _('UpdateCheckData must use HTTPS URL: {url}').format(url=url)
def check_ucm_tags(app): def check_ucm_tags(app):