lib/rmega/session.rb in rmega-0.1.2 vs lib/rmega/session.rb in rmega-0.1.3
- old
+ new
@@ -29,10 +29,10 @@
def storage
@storage ||= Storage.new(self)
end
def login(password)
- uh = Crypto.stringhash Crypto.prepare_key_pw(password), email
+ uh = Crypto.stringhash Crypto.prepare_key_pw(password), email.downcase
resp = request(a: 'us', user: email, uh: uh)
# Decrypts the master key
encrypted_key = Crypto.prepare_key_pw(password)
@master_key = Crypto.decrypt_key(encrypted_key, Utils.base64_to_a32(resp['k']))