From adab2721ee7388a716a8ae324103d1e970bc14e6 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Thu, 12 Dec 2024 13:35:20 +0100 Subject: [PATCH] fix: return InvalidSessionError when trying to access cache of Seedless session [no changelog] --- core/src/trezor/wire/thp/session_context.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/trezor/wire/thp/session_context.py b/core/src/trezor/wire/thp/session_context.py index d694269002..f266e7482e 100644 --- a/core/src/trezor/wire/thp/session_context.py +++ b/core/src/trezor/wire/thp/session_context.py @@ -1,6 +1,7 @@ from typing import TYPE_CHECKING from storage import cache_thp +from storage.cache_common import InvalidSessionError from storage.cache_thp import SessionThpCache from trezor import log, loop, protobuf, utils from trezor.wire import message_handler, protocol_common @@ -133,6 +134,10 @@ class SeedlessSessionContext(GenericSessionContext): def get_session_state(self) -> SessionState: return SessionState.SEEDLESS + @property + def cache(self) -> DataCache: + raise InvalidSessionError + class SessionContext(GenericSessionContext):