Sicherheitsupdate nach Audit (0.29.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m50s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m34s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m45s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m30s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m9s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m8s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m5s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-27 11:34:54 +00:00
parent a37895a16a
commit f1202bea08
226 changed files with 1952 additions and 450 deletions

View file

@ -2,6 +2,7 @@
namespace App\Support\Theme;
use App\Pagebuilder\Field;
use App\Support\Settings;
use Illuminate\Support\Arr;
@ -106,8 +107,9 @@ class Theme
{
$theme = self::normalize([...$this->working(), ...$values]);
foreach (['logo_light', 'logo_dark', 'logo_mark'] as $logo) {
SvgSanitizer::sanitizeFile($theme[$logo]);
// Alle Bildfelder – jedes könnte eine SVG-Datei sein
foreach (['logo_light', 'logo_dark', 'logo_mark', 'app_icon', 'login_image', 'profile_cover', 'avatar_placeholder'] as $image) {
SvgSanitizer::sanitizeFile($theme[$image]);
}
$this->settings->set(self::DRAFT, $theme);
@ -161,8 +163,9 @@ class Theme
$theme['profile_cover_overlay'] = array_key_exists((int) $theme['profile_cover_overlay'], self::COVER_OVERLAYS) ? (int) $theme['profile_cover_overlay'] : 70;
$theme['login_layout'] = array_key_exists($theme['login_layout'], self::LOGIN_LAYOUTS) ? $theme['login_layout'] : 'split';
$theme['footer_links'] = array_values(array_filter(array_map(
fn ($link) => is_array($link) && filled($link['label'] ?? null) && filled($link['url'] ?? null)
? ['label' => mb_substr(trim($link['label']), 0, 60), 'url' => mb_substr(trim($link['url']), 0, 500)]
// Nur sichere Adressen (kein javascript:, auch nicht aus importierten Themes)
fn ($link) => is_array($link) && filled($link['label'] ?? null) && ($url = Field::safeUrl(mb_substr(trim((string) ($link['url'] ?? '')), 0, 500))) !== ''
? ['label' => mb_substr(trim($link['label']), 0, 60), 'url' => $url]
: null,
(array) $theme['footer_links'],
)));