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

UI can't handle passwords with periods in their name #520

Closed
gardenappl opened this issue Apr 20, 2020 · 8 comments
Closed

UI can't handle passwords with periods in their name #520

gardenappl opened this issue Apr 20, 2020 · 8 comments

Comments

@gardenappl
Copy link

gardenappl commented Apr 20, 2020

Let's say, I have a password named my.account, so it's stored in a file named my.account.gpg. I want to rename it to different-name, so I click on "Rename password".

  • In the "Rename file" window, instead of saying "my.account" it just says "my".
  • When I enter the name "different-name", instead of saving it as different-name.gpg, it saves it as different-name.account! Then it no longer shows up on the password list.

Tested on Windows 10, without Git or native Pass.

@woodenphone
Copy link

I have also encountered this but while adding website passords.
"foobar.com" creates a file named "foobar.com" instead of a file named "foobar.com.gpg"
Manually changing the file extention of the password file(via windows explorer) to end in .gpg makes the password entry show up in the UI again.

Encountered in Windows 10, QTPass version 1.3.2, manually configured gpg "C:/Program Files (x86)/GnuPG/bin/gpg.exe" git "C:/Program Files/Git/bin/git.exe" pwgen "C:/Program Files (x86)/PWGen/PWGen.exe", native git/gpg option used, password store path "C:/Users/USERNAME/password-store/", "Use git" checked, "Automatically add .gpg-id" checked", "Automatically push/pull" both unchecked.

@gardenappl gardenappl changed the title Wrong file extension after renaming password with period in its name UI can't handle passwords with periods in their name Jul 6, 2020
@unor
Copy link

unor commented Jul 31, 2020

On GNU/Linux (using Pass, but not using Git):

  • Adding "test2.foo" creates the file test2.foo.gpg
    Adding "test3.foo.bar" creates the file test3.foo.bar.gpg

  • When trying to rename "test2.foo", the UI dialog only shows "test2"
    When trying to rename "test3.foo.bar", the UI dialog only shows "test3"

  • When renaming the entry "test2.foo" (which shows as "test2" in the renaming UI) to "bird", the entry gets renamed to "bird.foo", and the file gets renamed to bird.foo.gpg
    When renaming the entry "test3.foo.bar" (which shows as "test3" in the renaming UI) to "fish", the entry gets renamed to "fish.foo.bar", and the file gets renamed to fish.foo.bar.gpg

So, on GNU/Linux the issue of the renaming UI is the same as described above for Windows, but the files get renamed correctly, so the entries do not disappear in the list UI.

@ichthyosaurus
Copy link
Contributor

When I enter the name "different-name", instead of saving it as different-name.gpg, it saves it as different-name.account! Then it no longer shows up on the password list.

... and

I have also encountered this but while adding website passords.
"foobar.com" creates a file named "foobar.com" instead of a file named "foobar.com.gpg"

Can you reproduce this? I can't and the relevant code in realpass.cpp:118 looks fine to me.

@gardenappl
Copy link
Author

Can you reproduce this? I can't and the relevant code in realpass.cpp:118 looks fine to me.

I wasn't using real pass, I was imitating it.

I suspect it has something to do with Qt's baseName() function.

You should probably use completeBaseName() instead.

@ichthyosaurus
Copy link
Contributor

Ah, yes, in imitatepass.cpp:347 it's the same problem I fixed in #558 . The function is a bit messy though; I think it would be better if the author (or anyone familiar with the code) could have a look at it.

@ichthyosaurus
Copy link
Contributor

I had another look and fixed the "baseName" problem in #559 . I still cannot see how the old suffix ".account" could be kept if the new name "different-name" is correctly used. Before the fixes it should have either become "my.gpg" or "different-name.gpg". Or "different-name" already contained ".account"...?

@woodenphone 's bug could be related to real pass (realpass.cpp:60). Adding the suffix is left to pass, there.

I'll stop digging in code I'm not familiar with :).

@gardenappl
Copy link
Author

gardenappl commented Dec 23, 2020

@ichthyosaurus About the suffix bug, I was using v1.3.2 (latest release version) and I believe this was the cause of the error:

void MainWindow::renamePassword() {

Replacing baseName() with the inserted name, and then for some reason removing the .gpg extension from the new file. That just looks very wrong to me.

But that was fixed with a commit in June. It's just that the latest release is extremely old... And nobody (myself included) is gonna build stuff from source on Windows.

So yeah, don't worry about that.

@gardenappl
Copy link
Author

gardenappl commented Dec 23, 2020

I suppose this means I can close this issue, but man, the fact that the last release binaries are over a year old just really rubs me the wrong way. That's no way to maintain a password manager.

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

4 participants