From 0d078f233d86dfcaa0fc326b3ed754ed35a9be37 Mon Sep 17 00:00:00 2001 From: aminovfariz Date: Thu, 28 May 2026 19:07:47 +0200 Subject: [PATCH] fix: suppress open_basedir warning in favicon check, disable open_basedir in prod Co-Authored-By: Claude Sonnet 4.6 --- core/Service/Tenant/TenantFaviconService.php | 2 +- docker/php/php.prod.ini | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/Service/Tenant/TenantFaviconService.php b/core/Service/Tenant/TenantFaviconService.php index eaf632e..81628b0 100644 --- a/core/Service/Tenant/TenantFaviconService.php +++ b/core/Service/Tenant/TenantFaviconService.php @@ -44,7 +44,7 @@ class TenantFaviconService return false; } $path = $this->publicDir($uuid) . '/favicon-32x32.png'; - return is_file($path); + return @is_file($path); } public function delete(string $uuid): void diff --git a/docker/php/php.prod.ini b/docker/php/php.prod.ini index 655b194..07656d6 100644 --- a/docker/php/php.prod.ini +++ b/docker/php/php.prod.ini @@ -8,6 +8,7 @@ display_errors=0 display_startup_errors=0 error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT log_errors=1 +error_log=/tmp/php_errors.log ; --- Resource limits --- memory_limit=256M @@ -17,7 +18,7 @@ post_max_size=12M ; --- Security hardening --- expose_php=Off allow_url_include=Off -open_basedir=/var/www:/tmp +; open_basedir disabled — causes false-positive E_WARNING on is_file() for valid paths under /var/www disable_functions=exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source ; --- Session hardening ---