emmanueltouzery / projectpad2

Projectpad allows to manage secret credentials and server information that you need to handle as a software developer or sysadmin.
MIT License
87 stars 4 forks source link

empty password after escaping the first start dialog #1

Closed dschier-wtd closed 3 years ago

dschier-wtd commented 3 years ago

Hi, today I have tested your application.

During the very first start, I was asked to enter a password. I just closed the application. Now, the application is asking for a password, which is empty (just hit enter) and cannot be changed in the preferences. The password change dialog does not allow to apply until one enters one string and deletes it again. Sometimes you can also see an "out of memory" error.

Since a re-initialize is not possible, I am not able to test drive the application :/

emmanueltouzery commented 3 years ago

Hello! Interesting, I'll check it out, but not before the weekend. I was considering whether to require from the user to enter a non-empty password. I didn't think about the side effect that if you enter a blank password the 'change password' dialog won't work. I'll change something related to that for sure. The out of memory is very strange, hopefully I can reproduce it

So you hit a bug and I'll fix it. Short term, your could do two things:

  1. Delete the database. The readme explains where to find it
  2. If your database has valuable data and you want to change the password, you could use the sqlcipher command-line tool to change the password. If you're interested in that, let me know and I can explain more.
emmanueltouzery commented 3 years ago

Regarding the location of the database:

The database is a single file and will be in ~/.var/app/com.github.emmanueltouzery.projectpad/data/projectpad/projectpad.db if you use flatpak, or ~/.local/share/projectpad/projectpad.db if you run the application natively.

dschier-wtd commented 3 years ago

I will do so, thanks a lot for the fast response. Looking forward to test drive the tool. :+1:

emmanueltouzery commented 3 years ago

I researched this a little now and realized that to move to a non-encrypted (empty password) to an encrypted database, more work must be done: https://www.zetetic.net/sqlcipher/sqlcipher-api/index.html#sqlcipher_export

As long as empty password/non-encrypted DB support was "for free" then sure why not. If it's extra work and extra testing, I don't see the point, especially since with the option of storing the password in the keyring, the encryption really isn't much of a hassle. So I'll drop support for empty passwords.

dschier-wtd commented 3 years ago

would be totally fine for me. The problem was not, that I wanted to have an empty password db, but when "escaping" the initial setup an empty password db was created automatically.

emmanueltouzery commented 3 years ago

right! now i understood 100% what you meant :) i'll fix that first yes.

emmanueltouzery commented 3 years ago

ok, closing this bug, i have applied three changes related to this bug:

  1. the original thing: starting the app, closing it without acting on the first dialog, and restarting it, doesn't anymore think the DB was initialized
  2. the side issue that it's annoying to change the password if the current password is empty: prevent empty passwords, as I've also realised that moving between encrypted & non-encrypted DBs is messy
  3. related to deleting the database: added a new field in the preferences dialog that allows to easily locate the database on-disk
emmanueltouzery commented 3 years ago

I didn't publish the new version on flathub yet though. I'll probably do it through the week-end.

dschier-wtd commented 3 years ago

No pressure, I will give it a shot as soon as it is ready and try it out.

For now it looks very promissing and I will certainly provide some feedback.

emmanueltouzery commented 3 years ago

FYI, 2.0.1 is now on flathub (may take some time to fully refresh, but i just updated my version without issues)