From 96b49c68ec250d15371d1f9f40f91f998a93469e Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Thu, 8 Jan 2026 00:00:30 -0500 Subject: [PATCH] Fix get_channel_status() to decrypt stored keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function was trying to format encrypted keys directly, causing ValueError when reading ENC: prefixed stored keys. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/stegasoo/channel.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stegasoo/channel.py b/src/stegasoo/channel.py index 998f380..3a6ca19 100644 --- a/src/stegasoo/channel.py +++ b/src/stegasoo/channel.py @@ -411,11 +411,12 @@ def get_channel_status() -> dict: for config_path in CONFIG_LOCATIONS: if config_path.exists(): try: - file_key = config_path.read_text().strip() - if file_key and format_channel_key(file_key) == key: + stored = config_path.read_text().strip() + file_key = _decrypt_from_storage(stored) + if file_key and validate_channel_key(file_key) and format_channel_key(file_key) == key: source = str(config_path) break - except (OSError, PermissionError): + except (OSError, PermissionError, ValueError): continue return {