cryptoadvance / specter-diy

DIY airgapped hardware wallet that uses QR codes for communication with the host
MIT License
447 stars 75 forks source link

No safety checks for file overwriting #252

Closed scgbckbone closed 5 months ago

scgbckbone commented 1 year ago

from Wallet.export_menu

                fname = "/sd/%s.json" % self.name
                with open(platform.fpath(fname), "w") as f:
                    json.dump(obj, f)
                platform.unmount_sdcard()

Probably fail if file already exists in export location? Or at least ask user if he want' to rewrite?