1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

Validate version code when parsing metadata

This commit is contained in:
Ciaran Gultnieks 2013-04-14 10:48:40 +01:00
parent af391c7679
commit ce19ba1c29

View File

@ -416,6 +416,10 @@ def parse_metadata(metafile, **kw):
thisbuild['origlines'] = lines
thisbuild['version'] = parts[0]
thisbuild['vercode'] = parts[1]
try:
testvercode = int(thisbuild['vercode'])
except:
raise MetaDataException("Invalid version code for build in " + metafile.name)
thisbuild['commit'] = parts[2]
for p in parts[3:]:
pk, pv = p.split('=', 1)