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

lint: fix update check data https check

The urlver field can be '.', this was not considered in
26bfd7fb28.
This commit is contained in:
Marcus Hoffmann 2018-03-02 23:56:49 +01:00
parent c35b120ff2
commit c81d5da953
No known key found for this signature in database
GPG Key ID: ACDF63BC43D5E530

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):