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:
parent
3885ed6ef8
commit
8a1ac35c4d
1 changed files with 12 additions and 2 deletions
|
@ -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}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue