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

index.make_v0: ensure name is a str

This commit is contained in:
FC Stegerman 2023-01-10 19:40:52 +01:00
parent 5075586f7d
commit fc8820ff8e
No known key found for this signature in database
GPG Key ID: B218FF2C27FC6CC6

View File

@ -1300,7 +1300,7 @@ def make_v0(apps, apks, repodir, repodict, requestsdict, fdroid_signing_key_fing
name = app.get('localized', {}).get('en-US', {}).get('name')
if not name:
name = app.id
sanitized_name = re.sub(b'''[ '"&%?+=/]''', b'', name.encode('utf-8'))
sanitized_name = re.sub(b'''[ '"&%?+=/]''', b'', str(name).encode('utf-8'))
apklinkname = sanitized_name + os.path.splitext(current_version_file)[1].encode('utf-8')
current_version_path = os.path.join(repodir, current_version_file).encode('utf-8', 'surrogateescape')
if os.path.islink(apklinkname):