From 921fd875b951d94e985a33c50766cc6b6026d88c Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Fri, 6 May 2022 17:41:07 +0430 Subject: [PATCH] fix copymanga --- server/build.gradle.kts | 3 +++ .../src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/server/build.gradle.kts b/server/build.gradle.kts index d54bdb819..0f4dcf522 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -59,6 +59,9 @@ dependencies { // CloudflareInterceptor implementation("net.sourceforge.htmlunit:htmlunit:2.56.0") + // AES/CBC/PKCS7Padding Cypher provider for zh.copymanga + implementation("org.bouncycastle:bcprov-jdk18on:1.71") + // Source models and interfaces from Tachiyomi 1.x // using source class from tachiyomi commit 9493577de27c40ce8b2b6122cc447d025e34c477 to not depend on tachiyomi.sourceapi // implementation("tachiyomi.sourceapi:source-api:1.1") diff --git a/server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt index ecbbdbf15..d10a7afc5 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt @@ -13,6 +13,7 @@ import io.javalin.plugin.json.JavalinJackson import io.javalin.plugin.json.JsonMapper import kotlinx.serialization.json.Json import mu.KotlinLogging +import org.bouncycastle.jce.provider.BouncyCastleProvider import org.kodein.di.DI import org.kodein.di.bind import org.kodein.di.conf.global @@ -29,6 +30,7 @@ import xyz.nulldev.ts.config.ApplicationRootDir import xyz.nulldev.ts.config.ConfigKodeinModule import xyz.nulldev.ts.config.GlobalConfigManager import java.io.File +import java.security.Security import java.util.Locale private val logger = KotlinLogging.logger {} @@ -153,4 +155,7 @@ fun applicationSetup() { System.getProperties()["socksProxyPort"] = serverConfig.socksProxyPort logger.info("Socks Proxy is enabled to ${serverConfig.socksProxyHost}:${serverConfig.socksProxyPort}") } + + // AES/CBC/PKCS7Padding Cypher provider for zh.copymanga + Security.addProvider(BouncyCastleProvider()) }