commands: export_lightning_preimage: add comment about wallet password
What changed, and why it matters
This commit only adds a documentation comment to the export_lightning_preimage command explaining that exporting a Lightning payment preimage does not require the wallet password. It changes no code behavior, no access controls, and no security logic. There is no vulnerability in this patch.
No action required. This is a documentation-only change with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a two-line note to the docstring of Commands.export_lightning_preimage in electrum/commands.py. The note clarifies that RPC access alone is sufficient to export a preimage and that preimages are not treated as sensitive as private keys. No executable code, authentication checks, or API behavior were modified.
Changed components
electrum/commands.pyInspect captured patch +3 / −0
diff --git a/electrum/commands.py b/electrum/commands.py
index 301fc2e..ac3143e 100644
--- a/electrum/commands.py
+++ b/electrum/commands.py
@@ -1534,6 +1534,9 @@ class Commands(Logger):
"""
Returns the stored preimage of the given payment_hash if it is known.
+ note: Exporting a preimage does not require the wallet password (RPC access is enough).
+ We don't consider preimages as sensitive as private keys.
+
arg:str:payment_hash: Hash of the preimage
"""
preimage = wallet.lnworker.get_preimage_hex(payment_hash)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.