Closed gardenappl closed 3 years ago
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.
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.
When I enter the name "different-name", instead of saving it as
different-name.gpg
, it saves it asdifferent-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.
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.
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.
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 :).
@ichthyosaurus About the suffix bug, I was using v1.3.2 (latest release version) and I believe this was the cause of the error: https://github.com/IJHack/QtPass/blob/d242041c3efdba43b037ef3f8fb9f526a46173a9/src/mainwindow.cpp#L1010
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.
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.
Let's say, I have a password named
my.account
, so it's stored in a file namedmy.account.gpg
. I want to rename it todifferent-name
, so I click on "Rename password".different-name.gpg
, it saves it asdifferent-name.account
! Then it no longer shows up on the password list.Tested on Windows 10, without Git or native Pass.