lib/rotp/cli.rb in rotp-4.1.0 vs lib/rotp/cli.rb in rotp-5.0.0
- old
+ new
@@ -17,10 +17,10 @@
def errors
if %i[time hmac].include?(options.mode)
if options.secret.to_s == ''
red 'You must also specify a --secret. Try --help for help.'
- elsif options.secret.to_s.chars.any? { |c| ROTP::Base32::CHARS.index(c.downcase).nil? }
+ elsif options.secret.to_s.chars.any? { |c| ROTP::Base32::CHARS.index(c.upcase).nil? }
red 'Secret must be in RFC4648 Base32 format - http://en.wikipedia.org/wiki/Base32#RFC_4648_Base32_alphabet'
end
end
end