diff options
Diffstat (limited to 'lib/tfa/totp_command.rb')
| -rw-r--r-- | lib/tfa/totp_command.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/tfa/totp_command.rb b/lib/tfa/totp_command.rb index 8dd0125..14bc064 100644 --- a/lib/tfa/totp_command.rb +++ b/lib/tfa/totp_command.rb @@ -12,11 +12,9 @@ module TFA private def password_for(secret) - begin - ::ROTP::TOTP.new(secret).now - rescue - "???" - end + ::ROTP::TOTP.new(secret).now + rescue ROTP::Base32::Base32Error + "INVALID SECRET" end def all_passwords |
