mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 14:52:05 +01:00
Extract downloaded webUI zip in temp folder for validation (#744)
Could cause issues due to not having permission to create the folder to extract the zip into
This commit is contained in:
@@ -613,16 +613,13 @@ object WebInterfaceManager {
|
||||
}
|
||||
}
|
||||
|
||||
if (!isDownloadValid(zipFile.name, filePath)) {
|
||||
if (!isDownloadValid(filePath)) {
|
||||
throw Exception("Download is invalid")
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun isDownloadValid(
|
||||
zipFileName: String,
|
||||
zipFilePath: String,
|
||||
): Boolean {
|
||||
val tempUnzippedWebUIFolderPath = zipFileName.replace(".zip", "")
|
||||
private suspend fun isDownloadValid(zipFilePath: String): Boolean {
|
||||
val tempUnzippedWebUIFolderPath = zipFilePath.replace(".zip", "")
|
||||
|
||||
extractDownload(zipFilePath, tempUnzippedWebUIFolderPath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user