Skip to content

fix: Sanitise lightning addresses by casing in lnurlscan#3856

Merged
motorina0 merged 1 commit into
lnbits:devfrom
blackcoffeexbt:bugfix/lower_case_lightning_address_lookup
Mar 18, 2026
Merged

fix: Sanitise lightning addresses by casing in lnurlscan#3856
motorina0 merged 1 commit into
lnbits:devfrom
blackcoffeexbt:bugfix/lower_case_lightning_address_lookup

Conversation

@blackcoffeexbt
Copy link
Copy Markdown
Collaborator

Lightning addresses are case insensitive. If a lightning address with uppercase characters is given to the lnurlscan endpoint, the LNURL lib returns a "Invalid Lightning address" error. This fix lower cases lightning addresses before calling the lnurl lib.

@blackcoffeexbt blackcoffeexbt requested review from dni and motorina0 March 5, 2026 10:48
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.42%. Comparing base (55ec3f1) to head (c47e30c).
⚠️ Report is 7 commits behind head on dev.

Files with missing lines Patch % Lines
lnbits/core/views/lnurl_api.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3856      +/-   ##
==========================================
- Coverage   56.46%   56.42%   -0.04%     
==========================================
  Files         123      123              
  Lines       16943    16945       +2     
==========================================
- Hits         9567     9562       -5     
- Misses       7376     7383       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blackcoffeexbt blackcoffeexbt changed the title Sanitise lightning addresses by casing in lnurlscan fix: Sanitise lightning addresses by casing in lnurlscan Mar 5, 2026
@dni dni self-assigned this Mar 9, 2026
@motorina0 motorina0 force-pushed the bugfix/lower_case_lightning_address_lookup branch from 891fa03 to c47e30c Compare March 10, 2026 09:59
@motorina0 motorina0 merged commit 156ab10 into lnbits:dev Mar 18, 2026
45 checks passed
@motorina0 motorina0 added this to the 1.6.0 milestone Mar 18, 2026
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.

3 participants