diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index ccf082421a..f6ea76ef53 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -4,6 +4,8 @@ **App version:** +**Android version:** + **Issue/Request:** **Steps to reproduce (if applicable)** diff --git a/README.md b/README.md index 6b2fd3baaa..92b9e80b70 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ | Build | Stable | Dev | Contribute | Contact | |-------|----------|---------|------------|---------| -| [![Travis](https://img.shields.io/travis/inorichi/tachiyomi.svg)](https://travis-ci.org/inorichi/tachiyomi) | [![stable release](https://img.shields.io/github/release/inorichi/tachiyomi.svg?maxAge=3600&label=download%20(autoupdate%20included))](https://github.com/inorichi/tachiyomi/releases) | [![latest dev build](https://img.shields.io/badge/download-latest%20build-blue.svg)](http://tachiyomi.kanade.eu/latest) [![fdroid dev](https://img.shields.io/badge/autoupdate-wiki-blue.svg)](//github.com/inorichi/tachiyomi/wiki/F-Droid-for-dev-versions) | [![Translation status](https://hosted.weblate.org/widgets/tachiyomi/-/svg-badge.svg)](https://hosted.weblate.org/engage/tachiyomi/?utm_source=widget) | [![Discord](https://img.shields.io/discord/349436576037732353.svg)](https://discord.gg/tachiyomi) | +| [![Travis](https://img.shields.io/travis/inorichi/tachiyomi.svg)](https://travis-ci.org/inorichi/tachiyomi) | [![stable release](https://img.shields.io/github/release/inorichi/tachiyomi.svg?maxAge=3600&label=download%20(autoupdate%20included))](https://github.com/inorichi/tachiyomi/releases) | [![latest dev build](https://img.shields.io/badge/download-latest%20build-blue.svg)](http://tachiyomi.kanade.eu/latest) | [![Translation status](https://hosted.weblate.org/widgets/tachiyomi/-/svg-badge.svg)](https://hosted.weblate.org/engage/tachiyomi/?utm_source=widget) | [![Discord](https://img.shields.io/discord/349436576037732353.svg)](https://discord.gg/tachiyomi) | # ![app icon](./.github/readme-images/app-icon.png)Tachiyomi @@ -23,7 +23,7 @@ Features include: ## Download Get the app from our [releases page](https://github.com/inorichi/tachiyomi/releases). -If you want to try new features before they get to the stable release, you can download the dev version [here](http://tachiyomi.kanade.eu/latest) (auto-updates not included), or add our [F-Droid repo](https://github.com/inorichi/tachiyomi/wiki/F-Droid-for-dev-versions). +If you want to try new features before they get to the stable release, you can download the dev version [here](http://tachiyomi.kanade.eu/latest). (auto-updates not included) ## Issues, Feature Requests and Contributing diff --git a/app/build.gradle b/app/build.gradle index 7ca90752be..d6385802fd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -161,7 +161,9 @@ dependencies { implementation 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0' // Database - implementation 'eu.kanade.storio:storio:1.13.0' + implementation 'android.arch.persistence:db:1.0.0' + implementation 'com.github.inorichi.storio:storio-common:8be19de@aar' + implementation 'com.github.inorichi.storio:storio-sqlite:8be19de@aar' implementation 'io.requery:sqlite-android:3.25.2' // Model View Presenter diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt b/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt index 5bee37cabe..641cdd9602 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt @@ -12,8 +12,22 @@ class CloudflareInterceptor : Interceptor { private val challengePattern = Regex("""name="jschl_vc" value="(\w+)"""") + private val sPattern = Regex("""name="s" value="([^"]+)""") + + private val kPattern = Regex("""k\s+=\s+'([^']+)';""") + private val serverCheck = arrayOf("cloudflare-nginx", "cloudflare") + private interface IBase64 { + fun decode(input: String): String + } + + private val b64: IBase64 = object : IBase64 { + override fun decode(input: String): String { + return okio.ByteString.decodeBase64(input)!!.utf8() + } + } + @Synchronized override fun intercept(chain: Interceptor.Chain): Response { val response = chain.proceed(chain.request()) @@ -45,23 +59,36 @@ class CloudflareInterceptor : Interceptor { val operation = operationPattern.find(content)?.groups?.get(1)?.value val challenge = challengePattern.find(content)?.groups?.get(1)?.value val pass = passPattern.find(content)?.groups?.get(1)?.value + val s = sPattern.find(content)?.groups?.get(1)?.value - if (operation == null || challenge == null || pass == null) { + // If `k` is null, it uses old methods. + val k = kPattern.find(content)?.groups?.get(1)?.value ?: "" + val innerHTMLValue = Regex("""