mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[PR #1842] [CLOSED] Set file permissions for created files #3016
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#3016
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/1842
Author: @RealOrangeOne
Created: 7/6/2021
Status: ❌ Closed
Base:
main← Head:file-permissions📝 Commits (2)
2c0ec4cUsewrite_fileutil everywherec1dc531Set file permissions when creating files📊 Changes
6 files changed (+45 additions, -30 deletions)
View changed files
📝
src/api/core/ciphers.rs(+21 -16)📝
src/api/core/sends.rs(+3 -0)📝
src/api/icons.rs(+4 -9)📝
src/config.rs(+3 -4)📝
src/main.rs(+3 -1)📝
src/util.rs(+11 -0)📄 Description
Fixes https://github.com/dani-garcia/vaultwarden/discussions/1784
This isn't a full audit of all places files are created, but it covers most. Intentionally not set them on the image cache, as they're not sensitive.
It only works on unix, because that's the only place permissions like this work. It should work fine under docker even if docker isn't run on unix.
This also reuses the existing
write_fileutil in a few places which custom implemented it.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.