chore: okhttp 5.1.0

This commit is contained in:
hstyi
2025-07-08 13:50:59 +08:00
committed by hstyi
parent e4e41667ff
commit 057da4e297
4 changed files with 4 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ commons-io = "2.19.0"
jbr-api = "17.1.10.1" jbr-api = "17.1.10.1"
hutool = "5.8.37" hutool = "5.8.37"
jsch = "0.2.26" jsch = "0.2.26"
okhttp = "4.12.0" okhttp = "5.1.0"
sshj = "0.39.0" sshj = "0.39.0"
sshd-core = "2.15.0" sshd-core = "2.15.0"
jgit = "7.2.0.202503040940-r" jgit = "7.2.0.202503040940-r"

View File

@@ -3,7 +3,7 @@ plugins {
} }
project.version = "0.0.4" project.version = "0.0.5"

View File

@@ -1,7 +1,6 @@
package app.termora.plugins.bg package app.termora.plugins.bg
import app.termora.* import app.termora.*
import app.termora.database.DatabaseManager
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive import kotlinx.coroutines.isActive
@@ -96,9 +95,7 @@ internal class BackgroundManager private constructor() : Disposable, GlassPaneAw
return return
} }
val body = response.body val body = response.body
if (body != null) {
tempFile.outputStream().use { IOUtils.copy(body.byteStream(), it) } tempFile.outputStream().use { IOUtils.copy(body.byteStream(), it) }
}
IOUtils.closeQuietly(body) IOUtils.closeQuietly(body)
return@use tempFile return@use tempFile
} }

View File

@@ -3,7 +3,6 @@ package app.termora.account
import app.termora.AES import app.termora.AES
import app.termora.database.* import app.termora.database.*
import app.termora.database.Data.Companion.toData import app.termora.database.Data.Companion.toData
import okhttp3.internal.EMPTY_BYTE_ARRAY
import org.apache.commons.codec.binary.Base64 import org.apache.commons.codec.binary.Base64
import org.apache.commons.codec.digest.DigestUtils import org.apache.commons.codec.digest.DigestUtils
import org.apache.commons.lang3.ObjectUtils import org.apache.commons.lang3.ObjectUtils
@@ -88,7 +87,7 @@ abstract class SyncService {
return accountManager.getSecretKey() return accountManager.getSecretKey()
} }
val team = accountManager.getTeams().firstOrNull { it.id == ownerId } val team = accountManager.getTeams().firstOrNull { it.id == ownerId }
return team?.secretKey ?: EMPTY_BYTE_ARRAY return team?.secretKey ?: byteArrayOf()
} }
protected fun decryptData(id: String, data: String, ownerId: String): String { protected fun decryptData(id: String, data: String, ownerId: String): String {