Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested sub-folders not working, path is treated as folder name #603

Open
thijsvdn opened this issue May 10, 2021 · 5 comments
Open

Nested sub-folders not working, path is treated as folder name #603

thijsvdn opened this issue May 10, 2021 · 5 comments

Comments

@thijsvdn
Copy link

thijsvdn commented May 10, 2021

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:

lpass ls
my/nested/subfolder
    item_name: [id: xxxxxxxxxxxxxxxxxx]

Expected behaviour:

lpass ls
my
    nested
        subfolder
            item_name: [id: xxxxxxxxxxxxxxxxxx]
@nottwo
Copy link

nottwo commented May 13, 2021

@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)

@thijsvdn
Copy link
Author

thijsvdn commented May 18, 2021

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.

@thijsvdn
Copy link
Author

thijsvdn commented May 19, 2021

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.

@Mior
Copy link

Mior commented May 24, 2022

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:

  • Create password in shared folder:
    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.
  • trying to access same password with same
    lpass show -u "Shared-test folder/test customers\\customer_name/item_name"
    fails

@Mior
Copy link

Mior commented May 24, 2022

Possible duplication #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants