logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 3b82864bccee1af625dd19faed511d5b76f66f9d
parent 79d69ce72a4a922d1be8f3aae36d5fff3089fd1c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 14 Feb 2024 18:16:54 +0100

Config: Check the permissions of the linked file instead of the symlink↵

Diffstat:

Achangelog.d/config-stat-symlink.fix1+
Mlib/pleroma/config/release_runtime_provider.ex2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/changelog.d/config-stat-symlink.fix 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 @@ -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}"