From 64733a39dcf702d271236eb044fa23263e9948f2 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 22 Apr 2020 02:01:41 +0300 Subject: [PATCH] set more restrictive file permissions for exported private keys (#6106) --- electrum/gui/qt/main_window.py | 1 + 1 file changed, 1 insertion(+) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 2c65c895f..437ee5be3 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -2729,6 +2729,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): def do_export_privkeys(self, fileName, pklist, is_csv): with open(fileName, "w+") as f: + os.chmod(fileName, 0o600) if is_csv: transaction = csv.writer(f) transaction.writerow(["address", "private_key"])