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

fetchinvoice: handle weird labels in recurrence_label parameter.

Public commit record

What the developer wrote

Authored by Rusty Russell

65/100 · Adequate
fetchinvoice: handle weird labels in recurrence_label parameter.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit fixes how the fetchinvoice plugin handles user-supplied labels that contain special characters such as backslashes, quotes, tabs, and newlines. Previously these labels were passed as raw strings, which could cause JSON encoding problems when the plugin forwarded the label to other parts of the lightning node. The change now parses the label through a JSON-aware escaping helper and writes it back out as a safely escaped JSON string. The included test demonstrates that weird labels now work correctly for recurring invoices and cancellations.

Recommended action

Review other RPC parameters in fetchinvoice and related plugins that accept free-form strings and are re-emitted as JSON to ensure consistent use of json_escape/escaped-string helpers. Consider whether any externally reachable path could previously have caused malformed JSON or parser confusion.

Security signals we found

01

JSON injection / improper escaping of user-controlled input passed between RPC components

02

Potential mismatch between label parsing and label serialization leading to functional failures or unexpected behavior

03

Fix is narrowly scoped to a single plugin and parameter

Risk score

Why this scored 35/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/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.