summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2024-02-14 18:16:54 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2024-02-14 18:19:50 +0100
commit3b82864bccee1af625dd19faed511d5b76f66f9d (patch)
tree1a29e4970b5cbf9f35c00b023d8725473030dc29
parent79d69ce72a4a922d1be8f3aae36d5fff3089fd1c (diff)
Config: Check the permissions of the linked file instead of the symlink↵
-rw-r--r--changelog.d/config-stat-symlink.fix1
-rw-r--r--lib/pleroma/config/release_runtime_provider.ex2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/config-stat-symlink.fix b/changelog.d/config-stat-symlink.fix
new file mode 100644
index 000000000..c8b98225d
--- /dev/null
+++ b/changelog.d/config-stat-symlink.fix
@@ -0,0 +1 @@
+- Config: Check the permissions of the linked file instead of the symlink
diff --git a/lib/pleroma/config/release_runtime_provider.ex b/lib/pleroma/config/release_runtime_provider.ex
index 9ec0f975e..351639836 100644
--- a/lib/pleroma/config/release_runtime_provider.ex
+++ b/lib/pleroma/config/release_runtime_provider.ex
@@ -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}"