mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-17 22:57:32 +01:00
Ensure zip keyfile has unique entries
This commit is contained in:
parent
3885ed6ef8
commit
8a1ac35c4d
@ -445,8 +445,18 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
|
||||
|
||||
for (entry in zip.entries()) {
|
||||
when (entry.name) {
|
||||
"export.bin" -> dataEntry = entry
|
||||
"export.sig" -> sigEntry = entry
|
||||
"export.bin" ->
|
||||
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}")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user