Skip to content

Release v0.2.1 - Fix Message Decryption

Choose a tag to compare

@blocksorg blocksorg released this 04 Nov 03:04
· 16 commits to main since this release

MigChat CLI v0.2.1 - Message Decryption Fix

This is a patch release that fixes a critical bug where encrypted messages were not being decrypted when viewing conversations.

πŸ› Bug Fix

Fixed: Messages Showing as Encrypted Base64

Issue: When viewing conversations, messages were displaying as encrypted base64 text instead of decrypted plaintext.

Root Cause: The current_password was None when viewing conversations if the user was already logged in from a previous session. The password is only captured during login or account creation, not when starting an already-logged-in session.

Impact: Users couldn't read their encrypted messages - they would only see the raw base64 ciphertext like:

eyJ2ZXJzaW9uIjoxLCJzZW5k...

Solution

  • Added ensure_password() method that prompts for password when needed for decryption
  • Updated print_message() to use ensure_password() instead of assuming password exists
  • Better error handling to show specific decryption failures
  • Backward compatibility maintained for unencrypted messages

πŸ”§ How It Works Now

  1. When you view a conversation with encrypted messages
  2. If password isn't cached, you'll be prompted once to enter it
  3. Password is cached for the session
  4. All subsequent messages decrypt automatically
  5. If decryption fails, you see a clear error message instead of raw base64

πŸ“ Changes Since v0.2.0

Bug Fixes

  • Fixed message decryption not working when viewing conversations
  • Fixed borrow checker errors in password handling
  • Fixed type comparison issues after cloning current_user

Commits

  • 6c0f7be: Fix message decryption in conversations
  • df308fd: Fix borrow checker error in print_message
  • c6a9fa0: Fix type comparison after cloning current_user

Full Changelog: v0.2.0...v0.2.1

⚠️ Known Issue from v0.2.0

If you upgraded to v0.2.0, you may have seen this decryption issue. Upgrading to v0.2.1 fixes it completely.

πŸš€ Installation

Upgrading from v0.2.0:

  1. Download the new binary for your platform
  2. Replace your existing binary
  3. When viewing conversations, you'll be prompted for your password once

Quick Install (Linux/macOS):

curl -fsSL https://raw.githubusercontent.com/migchat/cli/main/install.sh | bash

Quick Install (Windows):

irm https://raw.githubusercontent.com/migchat/cli/main/install.ps1 | iex

Manual Installation:

  1. Download the binary for your platform below
  2. Rename it to migchat or migchat.exe (remove platform suffix)
  3. (Unix only) Make it executable: chmod +x migchat
  4. Move it to a directory in your PATH

πŸ“¦ What's in v0.2.x

v0.2.0 (Previous Release)

  • CRITICAL SECURITY FIX: Per-account encryption keys
  • Each account now has unique encryption keys
  • Account isolation enforced

v0.2.1 (This Release)

  • Bug Fix: Message decryption now works properly
  • Password prompting when needed
  • Better error handling

πŸ” Security

All security features from v0.2.0 remain:

  • βœ… Per-account encryption keys
  • βœ… Account isolation
  • βœ… Unique fingerprints per account
  • βœ… Signal Protocol/X3DH implementation
  • βœ… ChaCha20-Poly1305 encryption
  • βœ… Perfect forward secrecy

Type: Bug Fix
Priority: P1 - High (affects usability)
Recommendation: Upgrade if you experienced decryption issues in v0.2.0