Add check for repo/archive_url

This commit is contained in:
Jochen Sprickerhof 2022-04-21 09:54:30 +02:00
parent f4cb3bbfb4
commit 5f3eb601df
3 changed files with 67 additions and 0 deletions

View file

@ -433,6 +433,14 @@ def read_config(opts=None):
limit = config['git_mirror_size_limit']
config['git_mirror_size_limit'] = parse_human_readable_size(limit)
if 'repo_url' in config:
if not config['repo_url'].endswith('/repo'):
raise FDroidException(_('repo_url needs to end with /repo'))
if 'archive_url' in config:
if not config['archive_url'].endswith('/archive'):
raise FDroidException(_('archive_url needs to end with /archive'))
confignames_to_delete = set()
for configname, dictvalue in config.items():
if configname == 'java_paths':