bugfix: do not allow to import master seed as temporary
(cherry picked from commit 9188c7faf2)
This commit is contained in:
parent
a0eda9c6aa
commit
155c71de86
@ -12,6 +12,7 @@
|
||||
- Bugfix: Handle any failures in slot reading when loading settings
|
||||
- Bugfix: Add missing First Time UX for extended key import as master seed
|
||||
- Bugfix: Hide `Upgrade Firmware` menu item if temporary seed is active
|
||||
- Bugfix: Disallow using master seed as temporary seed
|
||||
|
||||
## 5.2.0 - 2023-10-10
|
||||
|
||||
|
||||
@ -152,6 +152,7 @@ class SettingsObject:
|
||||
mine = True
|
||||
|
||||
if new_secret:
|
||||
# hash up the secret... without decoding it or similar
|
||||
key = self.hash_key(new_secret)
|
||||
|
||||
if mine:
|
||||
|
||||
@ -413,7 +413,7 @@ class PinAttempt:
|
||||
# not-reached
|
||||
|
||||
def new_main_secret(self, raw_secret=None, chain=None, bip39pw='', blank=False,
|
||||
target_nvram_key = None):
|
||||
target_nvram_key=None):
|
||||
# Main secret has changed: reset the settings+their key,
|
||||
# and capture xfp/xpub
|
||||
# if None is provided as raw_secret -> restore to main seed
|
||||
@ -459,7 +459,6 @@ class PinAttempt:
|
||||
xfp = settings.get("xfp", 0)
|
||||
dis.draw_status(xfp=xfp, tmp=0, bip39=0)
|
||||
else:
|
||||
|
||||
xfp = sv.capture_xpub()
|
||||
dis.draw_status(xfp=xfp)
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ def test_lc():
|
||||
async def commit_new_words(new_words):
|
||||
# save the new seed value
|
||||
set_seed_value(new_words)
|
||||
|
||||
|
||||
# clear menu stack
|
||||
goto_top_menu(first_time=True)
|
||||
|
||||
@ -467,14 +467,15 @@ async def set_ephemeral_seed(encoded, chain=None, summarize_ux=True, bip39pw='',
|
||||
dis.fullscreen("Wait...")
|
||||
|
||||
applied, err_msg = pa.tmp_secret(encoded, chain=chain, bip39pw=bip39pw)
|
||||
|
||||
dis.progress_bar_show(1)
|
||||
xfp = settings.get("xfp", None)
|
||||
if xfp:
|
||||
xfp = "[" + xfp2str(xfp) + "]"
|
||||
|
||||
if not applied:
|
||||
await ux_show_story(title="FAILED", msg=err_msg)
|
||||
return
|
||||
|
||||
|
||||
xfp = "[" + xfp2str(settings.get("xfp", 0)) + "]"
|
||||
if summarize_ux:
|
||||
await ux_show_story(title=xfp, msg="New temporary master key is in effect now.")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user