Open thijsvdn opened 3 years ago
@thijsvdn Have you tried separating your folders with backslashes rather than forwardslashes?
https://github.com/lastpass/lastpass-cli/wiki/Specifying-sub-folders-(or-sub-groups)
Thanks, searched high and low for a solution and despite that I've still managed to miss that article.
I did try generating an item with a name structured using the "top\subfolder with spaces/my site with spaces" method, this resulted in the tool returning a password without adding it to LastPass if I'm not mistaken. In any case it did not have the desired result. Not sure if I tried "op\\subfolder/my-site", I'll give it a go as soon as possible.
Did some further testing, it seems to be related to shared folders. Trying to generate a password in a regular folder test folder\test customers\customer_name/item name
works as expected.
Generating a password for Shared-test folder\test customers\customer_name/item_name
(or showing an existing item) results in Error: Unable to find shared folder for Shared-test folder\test customers\customer_name/item_name in blob
. Double or single backslashes make no difference, in this case the user had administrator permissions.
Having same issue. It is visible only when having more than 1 level sub-folders not on single level, using double backlashes to separate sub-folders works when adding password like "main-folder\sub-folder/password-entry-name", It looks fine from LastPass web Vault but then when trying to access same password from CLI with full path and backslashes to separate folder (basically same way I create them) it failed to unable to retrieve password.
Steps to reproduce:
lpass generate --username="foo" --url="https://foo.bar" --no-symbols "Shared-test folder/test customers\\customer_name/item_name" 31
It will create folder correctly from web vault point of view.lpass show -u "Shared-test folder/test customers\\customer_name/item_name"
failsPossible duplication https://github.com/lastpass/lastpass-cli/issues/266
When generating a new password nested sub-folders are not created. It seems
lpass
only treats the last forward slash as a separator between the folder and item name. This causes the creation of a folder containing with the full path (minus the part after the last slash) as its name instead of creating a series of nested sub-folders.Example, when creating a password with:
lpass generate --username="foo" --url="https://foo.bar" --no-symbols "my/nested/subfolder/item_name" 32
Actual behaviour:
Expected behaviour: