Flag installations with vulnerable PHP in the central registry
Mark sites reporting a PHP release without the php2shell fixes (CVE-2026-109618/-109619; patched in 8.2.35, 8.3.36, 8.4.27, 8.5.12) or an end-of-life branch (8.1 and older). The overview gets a counter tile that doubles as a filter, a status pill per row and PHP in the search; the detail page explains that the hoster has to update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d3ee8e3d1e
commit
9d80af3795
7 files changed
+58
-5
No files matched your search
@@ -15,6 +15,15 @@ final class Bestand
|
||||
/** Ein abgeholter Auftrag ohne Ergebnis nach so vielen Stunden: keine Rückmeldung. */
|
||||
public const AUFTRAG_STUNDEN = 2;
|
||||
|
||||
/**
|
||||
* Erste PHP-Fassung je Zweig ohne bekannte kritische Lücke (zuletzt php2shell,
|
||||
* CVE-2026-109618/-109619, 21.10.2026). Bei der nächsten PHP-Sicherheitsmeldung hier nachziehen.
|
||||
*/
|
||||
public const PHP_SICHER = ['8.2' => '8.2.35', '8.3' => '8.3.36', '8.4' => '8.4.27', '8.5' => '8.5.12'];
|
||||
|
||||
/** Bis hierher gibt es keine Sicherheitsupdates mehr. */
|
||||
public const PHP_ALT_BIS = '8.1';
|
||||
|
||||
public function __construct(private \PDO $db)
|
||||
{
|
||||
}
|
||||
@@ -126,9 +135,32 @@ final class Bestand
|
||||
'auftrag_zustand' => $zustand,
|
||||
'kann_update' => '' === $grund,
|
||||
'kein_update_grund' => $grund,
|
||||
'php_luecke' => self::phpLuecke((string) $zeile['php']),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Warum die gemeldete PHP-Fassung als unsicher gilt, oder null. Unbekannte und neuere
|
||||
* Zweige (etwa 8.6-Vorabfassungen) gelten nicht als unsicher.
|
||||
*/
|
||||
public static function phpLuecke(string $php): ?string
|
||||
{
|
||||
if (1 !== preg_match('/^(\d+)\.(\d+)\.(\d+)/', $php, $teile)) {
|
||||
return null;
|
||||
}
|
||||
$zweig = $teile[1].'.'.$teile[2];
|
||||
$fassung = $zweig.'.'.$teile[3];
|
||||
if (version_compare($zweig, self::PHP_ALT_BIS, '<=')) {
|
||||
return sprintf('PHP %s bekommt keine Sicherheitsupdates mehr – auf PHP %s umstellen.', $zweig, self::PHP_SICHER['8.4']);
|
||||
}
|
||||
$sicher = self::PHP_SICHER[$zweig] ?? null;
|
||||
if (null !== $sicher && version_compare($fassung, $sicher, '<')) {
|
||||
return sprintf('PHP %s hat eine bekannte kritische Sicherheitslücke – mindestens %s nötig.', $fassung, $sicher);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $auftrag
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user