I've found a issue with reset password and SSL Encryption:
irb(main):001:0> require 'trocla'
=> true
irb(main):002:0> trocla = Trocla.new
=> #<Trocla:0x00000002bc90b0 @config_file="/etc/troclarc.yaml">
irb(main):003:0> trocla_get('toto', 'plain', {})
NoMethodError: undefined method `trocla_get' for main:Object
from (irb):3
from /bin/irb:12:in `<main>'
irb(main):004:0> trocla.get_password('toto', 'plain', {})
=> "toto"
irb(main):005:0> trocla.reset_password('toto', 'plain', {})
NoMethodError: undefined method `scan' for nil:NilClass
from /usr/local/share/gems/gems/trocla-0.2.3/lib/trocla/encryptions/ssl.rb:7:in `encrypt'
from /usr/local/share/gems/gems/trocla-0.2.3/lib/trocla.rb:129:in `encrypt'
from /usr/local/share/gems/gems/trocla-0.2.3/lib/trocla.rb:76:in `set_password'
from /usr/local/share/gems/gems/trocla-0.2.3/lib/trocla.rb:60:in `reset_password'
from (irb):5
from /bin/irb:12:in `<main>'
reset_password set en password with nil value, and it doesn't work for :
def encrypt(value)
ciphertext = ''
value.scan(/.{0,#{chunksize}}/m).each do |chunk|
ciphertext += Base64.encode64(public_key.public_encrypt(chunk)).gsub("\n",'')+"\n" if chunk
end
ciphertext
end
Hi,
I've found a issue with reset password and SSL Encryption:
reset_password set en password with nil value, and it doesn't work for :
Without SSL it's ok: