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

avoid deleting the backups of same-prefixed wallets

Public commit record

What the developer wrote

Authored by Craig Raw

50/100 · Thin
avoid deleting the backups of same-prefixed wallets
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in how Sparrow Wallet finds and deletes old wallet backups. Previously, the backup cleanup logic used loose pattern matching that could accidentally treat backups of one wallet as if they belonged to another wallet with a similar name. For example, a wallet named 'Savings' might incorrectly match backup files for 'SavingsX' or 'Savings.old'. The result could be that backups of a different wallet get deleted, or that cleanup of the intended wallet's backups fails. The patch replaces the loose prefix-and-date check with a strict regular expression that requires an exact wallet name, a complete 14-digit timestamp, and a matching file extension. New unit tests confirm that only correctly named backups are selected.

Recommended action

Users should upgrade to a Sparrow Wallet release that includes this commit so that automatic backup retention does not accidentally delete backups of similarly named wallets. Developers should review whether any other file-selection routines in the codebase rely on prefix-only matching and consider applying the same strict whole-name pattern approach.

Security signals we found

01

Incorrect backup selection could lead to deletion of another wallet's backup files

02

Loose filename prefix matching allowed same-prefixed wallet names to collide

03

Date extraction regex accepted extra trailing characters, broadening matches

04

Fix uses strict whole-filename regex with quoted wallet name and fixed-width timestamp

05

New unit tests cover name collision, extension matching, and regex literalization

Risk score

Why this scored 48/100

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