lastpass-python icon indicating copy to clipboard operation
lastpass-python copied to clipboard

Vault login fails

Open mattairsorted opened this issue 10 years ago • 4 comments

I've checked account credentials, multi-factor auth, and everything else I can think of, but receive the following logging output when trying to login via open_remote. Any help appreciated.

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): lastpass.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /iterations.php HTTP/1.1" 200 None
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): lastpass.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /login.php HTTP/1.1" 200 None
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): lastpass.com
DEBUG:requests.packages.urllib3.connectionpool:"GET /getaccts.php?mobile=1&b64=1&hash=0.0&hasplugin=3.0.23&requestsrc=android HTTP/1.1" 200 None
Traceback (most recent call last):
  File "../bin/airbnb/update_all_calendars.py", line 13, in <module>
    vault = lastpass.Vault.open_remote(lastpass_user, lastpass_pass)
  File "./lastpass/vault.py", line 10, in open_remote
    return cls.open(cls.fetch_blob(username, password, multifactor_password), username, password)
  File "./lastpass/vault.py", line 21, in open
    return cls(blob, blob.encryption_key(username, password))
  File "./lastpass/vault.py", line 45, in **init**
    key = parser.parse_SHAR(i, encryption_key, rsa_private_key)['encryption_key']
  File "./lastpass/parser.py", line 110, in parse_SHAR
    key = decode_hex(rsa_key.decrypt(encrypted_key))
  File "./lastpass/parser.py", line 193, in decode_hex
    return codecs.decode(data, 'hex_codec')
  File "/opt/projects/woop/platform/env/lib64/python2.7/encodings/hex_codec.py", line 42, in hex_decode
    output = binascii.a2b_hex(input)
TypeError: Odd-length string

mattairsorted avatar Jan 26 '16 15:01 mattairsorted

I'm also seeing this issue. Identical stack trace from open_remote() down, including line numbers. I have 2FA enabled (Google Authenticator), if that's of any use.

rho333 avatar Mar 06 '17 01:03 rho333

I also have this problem - I'm using python 3.6.1. Is anybody successfully using this with python 3? Maybe it's a bytes/unicode problem - after all, this package hasn't been updated in a long time. Conversely, is anyone successful with python 2?

rkhwaja avatar May 10 '17 16:05 rkhwaja

@rkhwaja I have just tested and can confirm that I'm also seeing the same issue using Python 2.7.11.

Edit: Actually I was seeing a different error which I've now managed to fix, so I can't confirm that the same issue occurs on Python 2. Sorry!

rho333 avatar May 11 '17 04:05 rho333

I see the same error. I think it occurs on enterprise shared folders. It works fine for personal accounts.

awkwong-whi avatar Jun 27 '17 17:06 awkwong-whi