mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-13 12:31:13 +00:00
Config: Check the permissions of the linked file instead of the symlink↵
This commit is contained in:
parent
79d69ce72a
commit
3b82864bcc
2 changed files with 2 additions and 1 deletions
1
changelog.d/config-stat-symlink.fix
Normal file
1
changelog.d/config-stat-symlink.fix
Normal file
|
@ -0,0 +1 @@
|
|||
- Config: Check the permissions of the linked file instead of the symlink
|
|
@ -21,7 +21,7 @@ defmodule Pleroma.Config.ReleaseRuntimeProvider do
|
|||
with_runtime_config =
|
||||
if File.exists?(config_path) do
|
||||
# <https://git.pleroma.social/pleroma/pleroma/-/issues/3135>
|
||||
%File.Stat{mode: mode} = File.lstat!(config_path)
|
||||
%File.Stat{mode: mode} = File.stat!(config_path)
|
||||
|
||||
if Bitwise.band(mode, 0o007) > 0 do
|
||||
raise "Configuration at #{config_path} has world-permissions, execute the following: chmod o= #{config_path}"
|
||||
|
|
Loading…
Reference in a new issue