Skip to content

Modernize Composer dependencies: Monolog 3, JWT 5.x, Guzzle, PHP 8.5 support#2049

Open
metalcated wants to merge 8 commits intocausefx:v2-developfrom
metalcated:v2-develop
Open

Modernize Composer dependencies: Monolog 3, JWT 5.x, Guzzle, PHP 8.5 support#2049
metalcated wants to merge 8 commits intocausefx:v2-developfrom
metalcated:v2-develop

Conversation

@metalcated
Copy link

  • Security and error handling improvements
  • Add phpxmlrpc/phpxmlrpc dependency
  • update for development
  • Fix 10 security vulnerabilities and add PHP 8.5 compatibility
  • Update platform.php from 7.4 to 8.1 for Monolog 3 compatibility
  • Add Monolog 3 custom formatter and fix API boolean parameters
  • Update vendor dependencies for Monolog 3 compatibility
  • Fix JWT key length for lcobucci/jwt 5.x compatibility

mgomon and others added 8 commits February 12, 2026 22:08
- Fix SQL injection in option-functions.php (use parameterized query for $url)
- Change all catch(Exception) to catch(\Throwable) across 14 files (42 occurrences)
- Remove debug logging in jackett.php that could expose API tokens
- Fix chmod 777 to 755 in update-functions.php (less permissive)
- Add escapeshellarg() to prevent command injection in update-functions.php
Security fixes:
- Update guzzlehttp/guzzle 7.3.0 -> 7.8.2 (fixes 4 CVEs)
- Update guzzlehttp/psr7 1.8.2 -> 1.9.1 (fixes 2 CVEs)
- Update slim/psr7 1.3.0 -> 1.8.0 (fixes 1 CVE)
- Update paragonie/sodium_compat 1.6.4 -> 2.5.0 (fixes 2 CVEs)
- Update pusher/pusher-php-server 4.1.5 -> 7.2.7

Breaking changes addressed:
- Remove kryptonit3/sonarr, kryptonit3/couchpotato, kryptonit3/sickrage
  (unmaintained since 2016-2017, required Guzzle 6)
- Replace with direct GuzzleHttp\Client calls in homepage files
- Remove nekonomokochan/php-json-logger (required PHP ~7.1)
- Replace with Monolog 3.x compatible OrganizrLogger class

Files modified:
- api/homepage/sonarr.php, radarr.php, lidarr.php, couchpotato.php,
  sickrage.php: Direct Guzzle HTTP calls instead of kryptonit3 wrappers
- api/classes/logger.class.php: New Monolog 3 based implementation
- api/classes/organizr.class.php: Updated logger type hint
- api/functions/log-functions.php: Use OrganizrLogger constants

Tested with PHP 8.5.2 on Alpine 3.23.2.
Composer audit shows 0 security vulnerabilities.
- Add OrganizrJsonFormatter for backward-compatible JSON log output
- Add IntrospectionProcessor for file/line info in logs
- Add WebProcessor for IP/user agent info in logs
- Add custom processor for trace_id, timezone, process_time
- Fix Sonarr/Radarr API boolean parameters (use 'true'/'false' strings)
Updates brick/math, lcobucci/clock, symfony/finder, symfony/yaml,
and other dependencies to versions compatible with PHP 8.5 and
Monolog 3 requirements.
Derive 256-bit key from organizrHash using SHA-256 hash to meet
minimum key length requirement for HMAC-SHA256 signing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant