mysigner 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f948f1bd3659c76f18ab35990ab196ab301f39e4de7a42598fde06b1e391a3c9
4
- data.tar.gz: acb32eee7a1c8c92f353fcfdef503a5f9392aa49d61ab0a5c1e4cc8781e22855
3
+ metadata.gz: dd7914051f5e940662b457a809c0b0ec9baee91e2e64162a132c0f17aa96b26d
4
+ data.tar.gz: ea5c0fcbf2c30caa927febbf4df5901c0c575158960b6b79bc7480ff6c0bc232
5
5
  SHA512:
6
- metadata.gz: 0aa6736246d956c406051b2f3fa816c2820d0f64ed5edbde79f46e2704279661eb524e4b0e36e483a65a3114e0073228aa4a0192a3753dfdf250f98aa893dc57
7
- data.tar.gz: 71ba8530c1f06736d3968ad230f62846d891a6848836a4822693dbdbb5845a39adba4b665b55ea160e96b335c1839ca8d3d0146626bdec5911f9a1a3f72fbdb4
6
+ metadata.gz: a0d0082a42826381b281ee0c62f757958e0a3a0b9ddac498545c28622238ab3ca4e9c52840b8c24012852e959a610fce7d24e3a432fd76b18ba919813fc12585
7
+ data.tar.gz: a611e25b8d2b07357f9eed035ab7c457ff73226ffce9b98ac862e185d3eebfe5bc5c84eb8ea3130b1bf874ecce95024c18113af33d97dddd5954f580aa2141c1
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to My Signer CLI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.3] - 2026-06-25
9
+
10
+ ### Fixed
11
+ - `logout` no longer dead-ends when the stored token is unreadable. Previously a corrupt/undecryptable token made the default `logout` (which revokes the server token) fail with misleading "once the server is reachable" advice and refuse to clear the local config — trapping the user, since re-login requires logging out first. Now an unreadable-token purge failure logs you out locally with a clear note to revoke the old token in the dashboard; transient server/network failures still keep the local config and suggest a retry.
12
+
8
13
  ## [0.3.2] - 2026-06-25
9
14
 
10
15
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mysigner (0.3.1)
4
+ mysigner (0.3.3)
5
5
  base64 (~> 0.2)
6
6
  faraday (~> 2.14)
7
7
  faraday-retry (~> 2.2)
@@ -709,10 +709,30 @@ module Mysigner
709
709
  config.load
710
710
  purge_server_credentials(config)
711
711
  purge_local_credentials
712
- rescue Mysigner::ClientError, Mysigner::ConfigError => e
713
- error "Failed to purge credentials on the server: #{e.message}"
712
+ rescue Mysigner::ConfigError => e
713
+ # The stored token is UNREADABLE (can't be decrypted), so it can
714
+ # never be revoked on the server from here and retrying --purge
715
+ # would fail identically. Clearing local is the only way out, so
716
+ # we do that (the token is useless anyway) and fall through to
717
+ # config.clear below — the user ends up logged out, and we tell
718
+ # them to revoke the old token in the dashboard if they care.
719
+ reason = e.message.sub(/\AFailed to decrypt token:\s*/, '').strip
720
+ detail = reason.empty? ? '' : " (#{reason})"
721
+ say "⚠️ Your stored token is unreadable#{detail}, " \
722
+ 'so it could not be revoked on the server.', :yellow
723
+ say ' Logging you out locally anyway. To revoke the old token, do it in', :yellow
724
+ say ' the My Signer dashboard (it cannot be read from this machine).', :yellow
714
725
  say ''
715
- say 'Local config was NOT cleared so you can retry. Options:', :yellow
726
+ begin
727
+ purge_local_credentials
728
+ rescue StandardError
729
+ # best-effort; a corrupt Keychain entry must not block the clear
730
+ end
731
+ # fall through to config.clear
732
+ rescue Mysigner::ClientError => e
733
+ error "Couldn't reach the server to revoke your credentials: #{e.message}"
734
+ say ''
735
+ say 'Your local config was NOT cleared so you can retry. Options:', :yellow
716
736
  say " • Re-run 'mysigner logout --purge' once the server is reachable", :yellow
717
737
  say " • Run 'mysigner logout --no-purge' to log out locally only", :yellow
718
738
  exit 1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mysigner
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysigner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurgen Leka