Check that restore file is from baresip application
This commit is contained in:
@ -705,6 +705,10 @@ object Utils {
|
||||
try {
|
||||
ZipFile(zipFilePath).use { zip ->
|
||||
zip.entries().asSequence().forEach { entry ->
|
||||
if (!entry.name.contains("/com.tutpro.baresip/")) {
|
||||
Log.e(TAG, "Backup file is not from baresip application")
|
||||
return false
|
||||
}
|
||||
zipFiles.add(entry.name.substringAfterLast("/"))
|
||||
zip.getInputStream(entry).use { input ->
|
||||
File(entry.name).outputStream().use { output ->
|
||||
|
||||
Reference in New Issue
Block a user