AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 34 Bitcoin

refactor: `g.settings` with a `PublicSettings` class for mapping, for reactive `WINDOW_SETTINGS` (#3644)

Public commit record

What the developer wrote

Authored by dni ⚡

70/100 · Adequate
refactor: `g.settings` with a `PublicSettings` class for mapping, for reactive `WINDOW_SETTINGS` (#3644)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit refactors how LNbits exposes site settings to the web frontend. It replaces a hand-maintained list of template variables with a new PublicSettings class that is explicitly marked as safe to expose publicly. The change is mostly a cleanup, but it also slightly alters what information is shown to visitors and how extensions can access it. There is no direct evidence in the commit of a security vulnerability being fixed or introduced, but the refactor touches a sensitive boundary between private server configuration and public web pages.

Recommended action

Review the PublicSettings model to confirm no sensitive fields (wallet keys, admin credentials, internal URLs, secrets, raw extension manifests) are included. Verify that templates and extensions no longer rely on removed globals such as LNBITS_AUTH_METHODS or LNBITS_ADMIN_UI unless they are now accessed through SETTINGS. Test that unauthenticated pages do not leak additional configuration compared to the previous window_settings dictionary. Consider adding automated tests that fail if a new setting is added to PublicSettings without explicit security review.

Security signals we found

01

Refactor of public settings exposure boundary

02

New PublicSettings class with explicit warning about not exposing private information

03

Reduction of individual Jinja2 globals derived from settings

04

Backwards compatibility shim for LNBITS_DENOMINATION retained for extensions

05

No explicit security fix or CVE reference in commit message

Risk score

Why this scored 34/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 5/15
Affected reach 10/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.