mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 04:04:03 -05:00
web/vendor still shipped firebase/php-jwt 5.0.0 although composer.json requires ^7.0 and composer.lock pinned 7.0.0: the lock had been bumped without regenerating vendor. Run composer update firebase/php-jwt (7.0.0 -> 7.2.1) and commit the regenerated vendor tree. php-jwt 6 changed JWT::decode() to take a Key instead of a key and an array of allowed algorithms, so validateToken() moves to JWT::decode($token, new Key($key, 'HS256')). Without that every token would fail to decode. JWT::encode() keeps its signature. php-jwt 7 also refuses HMAC keys shorter than the hash, which the preceding ZM_AUTH_HASH_SECRET commits handle, and requires PHP 8.0; composer's platform_check.php now reports an older PHP at autoload. Tests: tests/php/test_jwt_vendor.php round trips a token the way HostController and validateToken() do, refuses a wrong secret, an expired token and alg none, and fails if any JWT::decode() call uses the v5 signature, in the web code or these tests. test_zmu_credentials.php moves to the Key form and a 32 byte secret. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
748 B
PHP
23 lines
748 B
PHP
<?php
|
|
|
|
// autoload.php @generated by Composer
|
|
|
|
if (PHP_VERSION_ID < 50600) {
|
|
if (!headers_sent()) {
|
|
header('HTTP/1.1 500 Internal Server Error');
|
|
}
|
|
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
|
if (!ini_get('display_errors')) {
|
|
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
|
fwrite(STDERR, $err);
|
|
} elseif (!headers_sent()) {
|
|
echo $err;
|
|
}
|
|
}
|
|
throw new RuntimeException($err);
|
|
}
|
|
|
|
require_once __DIR__ . '/composer/autoload_real.php';
|
|
|
|
return ComposerAutoloaderInit254e25e69fe049d603f41f5fd853ef2b::getLoader();
|