Closed MitchelPaulin closed 9 months ago
I'd be willing to take a look at implementing this as well if its something that theres interest in adding it
Just to make it clear that password is purely for the settings, it should not be used for file encryption, if you want to do that you will need to create a separate one. Using a password that is clearly defined as only being used to restrict access to a section of the app, for suddenly encrypting the files on disk, is not what any user will want (that changes it from a parental control to a data loss hazard)
Hashing the settings password was discussed in the original pull request but was left until later, it wasn't considered vital for the initial implementation, so fell free to add it.
We definitely can't encrypt the whole directory, as most of the stuff that is in there are Electron files.
Encrypting the databases is going to be difficult too, as you would have to fork and maintain a copy of the database dependency, because it reads and writes the file itself, we don't do that. Would also make life difficult for the web build and the Cordova fork.
If you want to implement hashing the settings password, I would be okay with approving a pull request for that.
Side note: hashing the password would give you a false sense of security, anyone that knows enough to look at the files, can also just delete the password entry from the database and get rid of it entirely, but if you think it's still worth doing I won't stop you from adding it.
Just to make it clear that password is purely for the settings, it should not be used for file encryption, if you want to do that you will need to create a separate one. Using a password that is clearly defined as only being used to restrict access to a section of the app, for suddenly encrypting the files on disk, is not what any user will want (that changes it from a parental control to a data loss hazard)
Hashing the settings password was discussed in the original pull request but was left until later, it wasn't considered vital for the initial implementation.
We definitely can't encrypt the whole directory, as most of the stuff that is in there are Electron files.
Encrypting the databases is going to be difficult too, as you would have to fork and maintain a copy of the database dependency, because it reads and writes the file itself, we don't do that. Would also make life difficult for the web build and the Cordova fork.
Yeah there was no plan to encrypt the whole db, just the password, of course this isn't entirely secure either as you can just edit the file yourself and remove the password or since its open source and you know the hashing algorithm, change it to a password you would like by calculating its hash, but at least this way it may not leak a password that someone may be using on multiple accounts.
Isnt this a duplicat of https://github.com/FreeTubeApp/FreeTube/issues/3221 ?
Duplicate of https://github.com/FreeTubeApp/FreeTube/issues/3221
Guidelines
Problem Description
Settings password is visible easily in plain text
The password should not be stored in plaintext, it should be hashed then stored
Proposed Solution
Hash the password using a secure algorithm and store the hash only
When the password is entered calculate the hash, then compare it
Alternatives Considered
You could encrypt all data https://github.com/FreeTubeApp/FreeTube/issues/3223
But this is at least a good start, even if you encrypt the whole directory you probably still want that password hashed.
Issue Labels
improvement to existing feature
Additional Information
No response