Skip to content

fix: honor callback settings for withdrawal webhooks - #82

Merged
motorina0 merged 1 commit into
mainfrom
fix/withdraw-webhook-callback-settings
Nov 10, 2026
Merged

motorina0 merged 1 commit into
mainfrom
fix/withdraw-webhook-callback-settings

Conversation

@motorina0

Copy link
Copy Markdown
Collaborator

Withdraw webhooks to an explicitly approved local receiver, such as http://localhost:8500, currently fail with UnsafeHttpDestinationError after the withdrawal has already been paid. This is the failure in the extensions integration job.

Match Pay Links' callback handling: pass an exact administrator-approved origin as private_endpoint, and honor lnbits_callback_allow_private_ips when no explicit endpoint applies. Wildcard rules do not grant a loopback exception. Keep core destination checks, disabled redirects, and empty webhook response metadata. URL parsing and client setup failures are recorded as webhook failures without interrupting a paid withdrawal.

Validation: the new regression cases reproduced the failure before the change. All 27 tests pass, covering IPv4/IPv6 local receivers, the private-IP setting, origin boundaries, metadata/self-target rejection, redirects, malformed URLs, and existing payload handling. Black, Ruff, Mypy, Pyright, and Prettier checks pass.

This fixes Withdraw's implementation; the extensions registry will need a release containing it before its integration job can consume the change.

@motorina0
motorina0 merged commit 0a51040 into main Nov 10, 2026
6 checks passed
@motorina0
motorina0 deleted the fix/withdraw-webhook-callback-settings branch November 10, 2026 10:59
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.

1 participant