FIX(client): Permission for settings.json and backup was too open#6667
FIX(client): Permission for settings.json and backup was too open#6667theboywholived wants to merge 1 commit intomumble-voip:masterfrom
Conversation
Changes permission for settings.json and corresponding backup file to 600. Fixes mumble-voip#6652
Krzmbrzl
left a comment
There was a problem hiding this comment.
Is there no way to set the permissions directly when writing the file?
If we're young this in a 2-step process, then there always is a short period of time in which the file still has the wrong permissions. Admittedly, that period is very short but ideally we wouldn't have that at all 👀
|
I believe we should set the default permissions on the folder itself, perhaps with a warning when we detect sensitive files to be too accessible. |
Right now I am not able to see any way to do this without using very low-level commands of the system. Qt does not offer any constructor while creating the files to set permissions.
Does that seem possible? |
Not sure if this is really needed 👀
Alright, then it is as it is 🤷 |
|
@theboywholived FYI, it looks like your commit does not contain valid author information. This is technically not a problem, but your commit will not be referenced to you or your GitHub account. You might want to update the commit with a valid |
Hartmnt
left a comment
There was a problem hiding this comment.
This does not quite work, yet. It correctly sets the permissions on the mumble_settings.json at first.
But when I click OK in the settings dialog, it reliably changes the permissions back to 644 while Mumble is running. Only when I close the application properly it becomes 600 again.
|
I will need to test my changes a bit more - I will get back. |
Changes permission for settings.json and corresponding backup file to 600.
Fixes #6652
Checks