Skip to content

MangaLivre: handle rotating reading-gate signatures - #17738

Merged
AwkwardPeak7 merged 2 commits into
keiyoushi:mainfrom
atiladpribeiro:fix-mangalivre-current-reading-gate
Jul 21, 2026
Merged

MangaLivre: handle rotating reading-gate signatures#17738
AwkwardPeak7 merged 2 commits into
keiyoushi:mainfrom
atiladpribeiro:fix-mangalivre-current-reading-gate

Conversation

@atiladpribeiro

Copy link
Copy Markdown
Contributor

Summary

  • update the MangaLivre reading gate to match the current toonlivre.net request signature
  • extract both fixed, byte-array-obfuscated signatures and the previous time-windowed signature format from the live bundle
  • refresh rotating gate and encryption constants after a 403, rotate the verification cookie, and keep the WebView primer as the final recovery path
  • isolate the public API verification cookie so stale session cookies cannot poison reader requests
  • parse API DTOs without generated serializer ABI coupling
  • bump the extension to 1.4.80

Root cause

The site changed x-toon-signature from a time-windowed SHA-256 value to fixed tokens encoded as byte arrays in the minified frontend bundle. The extension kept sending the previous signature, so chapter page-list requests were rejected with HTTP 403 even though the website itself still worked.

Validation

  • :src:pt:mangalivre:clean
  • :src:pt:mangalivre:assembleDebug
  • :src:pt:mangalivre:lintDebug
  • live catalog, details, chapter-list, encrypted page-list, and image loading checks against toonlivre.net
  • opened three separate source chapters (82, 18, and 210); real pages rendered and the reader remained open for more than 20 seconds with no 403, page-list failure, or crash in logs

Checklist:

  • Updated versionCode value in build.gradle.kts
  • Updated baseVersionCode in build.gradle.kts (not applicable: this is not a multisrc theme change)
  • Referenced all related issues in the PR body (none found)
  • Set the contentWarning configuration in build.gradle.kts appropriately
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed (not applicable)
  • Have tested the modifications by compiling and running the extension through Android Studio-compatible Gradle tasks and on-device runtime checks
  • Have removed web_hi_res_512.png when adding a new extension (not applicable)
  • This PR is AI-assisted, I have reviewed the changes manually and confirmed they are not slop

@atiladpribeiro
atiladpribeiro marked this pull request as ready for review July 19, 2026 18:58
Comment thread src/pt/mangalivre/src/eu/kanade/tachiyomi/extension/pt/mangalivre/MangaLivre.kt Outdated
@AwkwardPeak7
AwkwardPeak7 merged commit 1f78d4f into keiyoushi:main Jul 21, 2026
2 checks passed
@AwkwardPeak7

Copy link
Copy Markdown
Contributor

@atiladpribeiro It appears users can't install this version, crash on startup...

AwkwardPeak7 added a commit that referenced this pull request Jul 21, 2026
@atiladpribeiro

Copy link
Copy Markdown
Contributor Author

Confirmed. The startup/catalog failure was caused by generated kotlinx.serialization serializers calling a newer runtime ABI. PR #17855 replaces them with the kotlinx.serialization JSON tree API, updates the current Rabbit key derivation, and adds bounded live-bundle recovery for future rotations. The final APK was validated through catalog, details, chapter lists, and multiple online chapters, and the upstream CI check is passing.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants