0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-10 13:05:05 +00:00

Ensure zip keyfile has unique entries

This commit is contained in:
Christian Grigis 2021-02-09 18:39:34 +01:00 committed by Marvin W
parent 3885ed6ef8
commit 8a1ac35c4d

View file

@ -445,8 +445,18 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
for (entry in zip.entries()) { for (entry in zip.entries()) {
when (entry.name) { when (entry.name) {
"export.bin" -> dataEntry = entry "export.bin" ->
"export.sig" -> sigEntry = entry if (dataEntry != null) {
throw Exception("Zip archive contains more than one 'export.bin' entry")
} else {
dataEntry = entry
}
"export.sig" ->
if (sigEntry != null) {
throw Exception("Zip archive contains more than one 'export.sig' entry")
} else {
sigEntry = entry
}
else -> throw Exception("Unexpected entry in zip archive: ${entry.name}") else -> throw Exception("Unexpected entry in zip archive: ${entry.name}")
} }
} }