logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: f28dcc9cb748fc75d41cfc3038209fa45f2b90c7
parent d19642d7eba9adc51de48b113f5a5ebfafbaf40d
Author: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Date:   Thu, 15 Feb 2024 01:48:03 +0000

Merge branch 'config-stat-symlink' into 'develop'

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

See merge request pleroma/pleroma!4061

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}"