lastpass library suddenly stopped working
Hi,
I am using lastpass-python in my projects, but today morning stopped working and I am unable get credentials from lastpass.
Looks like they changed something in lastpass ...
I tried this with more accounts, with more computers, within more networks...
Thanks
Stopped working for me as well!
https://lastpass.com/iterations.php is returning a 500 code
https://lastpass.com/iterations.php is returning a 500 code
I can confirm. It works fine if you visit via a browser, but it's failing in the requests post here https://github.com/konomae/lastpass-python/blob/1ece13f04bb6c20ba1d01e7bcfcad6a48ee6527f/lastpass/fetcher.py#L51-L52
I've also tested a requests.get and still get a 500 status code.
Edit: Here's the kicker: I just tested using the ruby version of the repo and it works fine. Must be something with lastpass and requests, otherwise I can't figure out what's going on.
Edit2: The post works with urllib3, so it's apparently a requests specific issue
I think adding Chrome headers to the two POST requests in fetcher.py fixed it.
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36'} # This is chrome, you can set whatever browser you like
response = web_client.post('https://lastpass.com/iterations.php',
data={'email': username},
headers=headers
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36'} # This is chrome, you can set whatever browser you like
response = web_client.post('https://lastpass.com/login.php',
data=body,
headers=headers)
That worked for me. I noticed that the default user agent for requests is python-requests. For those routes, they must be strictly denied access, because the URL https://lastpass.com/ works perfectly fine.
Works!
Worked for me as well
This worked for me too, @konomae, will you be pushing an update with this? Thanks!
Thank you for reporting this!
This problem has been fixed:
- https://github.com/konomae/lastpass-python/releases/tag/v0.3.2
- https://pypi.org/project/lastpass-python/0.3.2/
Related:
- #41
- #42
- https://github.com/konomae/lastpass-python/compare/v0.3.1...v0.3.2