Skip to content

chore: bump version 2.4.1 - #1174

Open
piotr-iohk wants to merge 15 commits into
masterfrom
release-2.4.1
Open

chore: bump version 2.4.1#1174
piotr-iohk wants to merge 15 commits into
masterfrom
release-2.4.1

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Bump version to 2.4.1 (build 188) for release.

This is a hotfix branch cut from v2.4.0, not from master. Do not merge this branch into master. Master already contains these commits plus 2.5.0 work. After store ship, open a small follow-up on master to insert ## [2.4.1], drop consumed changelog.d/next/ fragments, and bump master's version.

Description

  • versionCode: 187 → 188
  • versionName: 2.4.0 → 2.4.1

Cherry-picked from master

Also on this branch: fix: compile release-2.4.1 cherry-picks (strip 2.5.0 leftovers so the cherry-picks compile on 2.4.0).

Preview

N/A

QA Notes

N/A

Made with Cursor

ovitrif and others added 12 commits August 21, 2026 08:37
fix: update DataStore for 16 KB compatibility
…overy

fix: stop auto-accepting stale monitors
…time

feat: increase background stop debounce time
…h-86ae

fix: secure shop payments and locked links
fix: gate pubky auth handler
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

Greptile Summary

This hotfix release bumps Bitkit to 2.4.1 (build 188) and cherry-picks security and stability fixes from master.

  • Hardens LDK node teardown, lifecycle recovery, Electrum validation, and stale-monitor handling.
  • Requires authenticated VSS access and updates the LDK/VSS dependencies.
  • Gates Pubky authorization routing and restricts shop payment messages to the trusted Bitrefill origin.
  • Defers locked payment links and adds focused tests for the changed flows.

Confidence Score: 3/5

This PR should not ship until the Electrum probe bounds remote response sizes to prevent a configured endpoint from exhausting application memory.

The new probe reads arbitrary remote response data with unbounded readLine() calls, allowing a malicious custom Electrum endpoint to grow heap usage until the wallet crashes.

Files Needing Attention: app/src/main/java/to/bitkit/services/ElectrumProbeService.kt

Security Review

The new Electrum probe accepts an unbounded line from a user-configured remote endpoint. A malicious endpoint can stream non-newline data without triggering the per-read timeout, causing unbounded memory growth and an application crash.

Important Files Changed

Filename Overview
app/src/main/java/to/bitkit/services/ElectrumProbeService.kt Adds preflight Electrum validation, but reads attacker-controlled response lines without a size bound.
app/src/main/java/to/bitkit/repositories/LightningRepo.kt Adds debounced stopping, serialized configuration changes, Electrum probing, and native-release gating.
app/src/main/java/to/bitkit/services/LightningService.kt Makes teardown non-cancellable, explicitly releases native handles, gates rebuilds, and removes stale-monitor recovery.
app/src/main/java/to/bitkit/services/PubkyAuthHandlerRegistrar.kt Dynamically enables the Pubky authorization alias only when Paykit, identity, and local-key requirements are met.
app/src/main/java/to/bitkit/ui/screens/shop/shopWebView/ShopWebViewInterface.kt Replaces the broad JavaScript bridge with an origin-scoped WebMessageListener and fails closed when unsupported.
app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt Defers scans until authentication and serializes scan processing to prevent overlapping payment flows.
app/src/main/java/to/bitkit/data/backup/VssBackupClient.kt Removes unauthenticated VSS fallback and fails closed when LNURL authentication is unavailable.
app/build.gradle.kts Bumps the release to version 2.4.1/build 188 and adds AndroidX WebKit.

Sequence Diagram

sequenceDiagram
    actor User
    participant UI as Electrum settings
    participant Repo as LightningRepo
    participant Probe as ElectrumProbeService
    participant Server as Custom Electrum server
    User->>UI: Enter or scan endpoint
    UI->>Repo: restartWithElectrumServer(url)
    Repo->>Probe: probe(parsed server)
    Probe->>Server: server.version
    Server-->>Probe: JSON-RPC response line
    Probe->>Server: server.features
    Server-->>Probe: JSON-RPC response line
    alt Probe succeeds
        Repo->>Repo: Stop and rebuild LDK node
        Repo->>Repo: Persist server setting
    else Probe fails
        Repo-->>UI: Reject server without stopping node
    end
Loading

Reviews (1): Last reviewed commit: "chore: version 2.4.1" | Re-trigger Greptile

Comment thread app/src/main/java/to/bitkit/services/ElectrumProbeService.kt
@piotr-iohk

piotr-iohk commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

@piotr-iohk piotr-iohk self-assigned this Aug 21, 2026
@piotr-iohk
piotr-iohk requested review from jvsena42 and ovitrif August 21, 2026 08:02
@piotr-iohk

piotr-iohk commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

@IoDispatcher ioDispatcher: CoroutineDispatcher,
) {
private val scope: CoroutineScope = appScope(ioDispatcher, TAG)
private val scope: CoroutineScope = CoroutineScope(ioDispatcher + SupervisorJob())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regression from adaptation, should be appScope(ioDispatcher, TAG)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants