[pkg-nagios-changes] [Git][nagios-team/icinga-php-library][master] 4 commits: New upstream version 1.0.1
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Tue Sep 15 13:50:59 BST 2026
Bas Couwenberg pushed to branch master at Debian Nagios Maintainer Group / icinga-php-library
Commits:
8432d199 by Bas Couwenberg at 2026-09-15T04:15:54-07:00
New upstream version 1.0.1
- - - - -
315fce7d by Bas Couwenberg at 2026-09-15T04:16:03-07:00
Update upstream source from tag 'upstream/1.0.1'
Update to upstream version '1.0.1'
with Debian dir ef501c3496442663266812c6ebbf49874a894475
- - - - -
3331f13c by Bas Couwenberg at 2026-09-15T04:19:18-07:00
New upstream release.
- - - - -
bb4641dd by Bas Couwenberg at 2026-09-15T04:19:51-07:00
Set distribution to unstable.
- - - - -
18 changed files:
- VERSION
- composer.lock
- debian/changelog
- vendor/composer/installed.json
- vendor/composer/installed.php
- vendor/guzzlehttp/psr7/src/Header.php
- vendor/guzzlehttp/psr7/src/Message.php
- vendor/guzzlehttp/psr7/src/MessageTrait.php
- vendor/guzzlehttp/psr7/src/MimeType.php
- vendor/guzzlehttp/psr7/src/MultipartStream.php
- vendor/guzzlehttp/psr7/src/Request.php
- vendor/guzzlehttp/psr7/src/ServerRequest.php
- vendor/guzzlehttp/psr7/src/Uri.php
- vendor/guzzlehttp/psr7/src/UriComparator.php
- vendor/guzzlehttp/psr7/src/UriNormalizer.php
- vendor/guzzlehttp/psr7/src/UriResolver.php
- vendor/guzzlehttp/psr7/src/Utils.php
- vendor/symfony/polyfill-php83/bootstrap72.php
Changes:
=====================================
VERSION
=====================================
@@ -1 +1 @@
-v1.0.0
+v1.0.1
=====================================
composer.lock
=====================================
@@ -357,16 +357,16 @@
},
{
"name": "guzzlehttp/psr7",
- "version": "2.12.3",
+ "version": "2.13.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d"
+ "reference": "95e7828100de18b4e269fb1703be530082d5166d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
- "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/95e7828100de18b4e269fb1703be530082d5166d",
+ "reference": "95e7828100de18b4e269fb1703be530082d5166d",
"shasum": ""
},
"require": {
@@ -456,7 +456,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.12.3"
+ "source": "https://github.com/guzzle/psr7/tree/2.13.1"
},
"funding": [
{
@@ -472,7 +472,7 @@
"type": "tidelift"
}
],
- "time": "2026-06-23T15:21:08+00:00"
+ "time": "2026-08-24T09:13:11+00:00"
},
{
"name": "icinga/zf1",
@@ -1629,16 +1629,16 @@
},
{
"name": "symfony/polyfill-php83",
- "version": "v1.38.2",
+ "version": "v1.41.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php83.git",
- "reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8"
+ "reference": "5ea99087fb99c273a9b9236ed4c31e78b16103c6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/796a26abb75ce49f3a84433cd81bf1009d73d5f8",
- "reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8",
+ "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/5ea99087fb99c273a9b9236ed4c31e78b16103c6",
+ "reference": "5ea99087fb99c273a9b9236ed4c31e78b16103c6",
"shasum": ""
},
"require": {
@@ -1685,7 +1685,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php83/tree/v1.38.2"
+ "source": "https://github.com/symfony/polyfill-php83/tree/v1.41.0"
},
"funding": [
{
@@ -1705,7 +1705,7 @@
"type": "tidelift"
}
],
- "time": "2026-05-27T06:51:48+00:00"
+ "time": "2026-07-01T12:47:55+00:00"
},
{
"name": "symfony/polyfill-php84",
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+icinga-php-library (1.0.1-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 15 Sep 2026 04:19:42 -0700
+
icinga-php-library (1.0.0-1) unstable; urgency=medium
* New upstream release.
=====================================
vendor/composer/installed.json
=====================================
@@ -369,17 +369,17 @@
},
{
"name": "guzzlehttp/psr7",
- "version": "2.12.3",
- "version_normalized": "2.12.3.0",
+ "version": "2.13.1",
+ "version_normalized": "2.13.1.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d"
+ "reference": "95e7828100de18b4e269fb1703be530082d5166d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
- "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/95e7828100de18b4e269fb1703be530082d5166d",
+ "reference": "95e7828100de18b4e269fb1703be530082d5166d",
"shasum": ""
},
"require": {
@@ -403,7 +403,7 @@
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
- "time": "2026-06-23T15:21:08+00:00",
+ "time": "2026-08-24T09:13:11+00:00",
"type": "library",
"extra": {
"bamarni-bin": {
@@ -471,7 +471,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.12.3"
+ "source": "https://github.com/guzzle/psr7/tree/2.13.1"
},
"funding": [
{
@@ -1704,23 +1704,23 @@
},
{
"name": "symfony/polyfill-php83",
- "version": "v1.38.2",
- "version_normalized": "1.38.2.0",
+ "version": "v1.41.0",
+ "version_normalized": "1.41.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php83.git",
- "reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8"
+ "reference": "5ea99087fb99c273a9b9236ed4c31e78b16103c6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/796a26abb75ce49f3a84433cd81bf1009d73d5f8",
- "reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8",
+ "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/5ea99087fb99c273a9b9236ed4c31e78b16103c6",
+ "reference": "5ea99087fb99c273a9b9236ed4c31e78b16103c6",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
- "time": "2026-05-27T06:51:48+00:00",
+ "time": "2026-07-01T12:47:55+00:00",
"type": "library",
"extra": {
"thanks": {
@@ -1763,7 +1763,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php83/tree/v1.38.2"
+ "source": "https://github.com/symfony/polyfill-php83/tree/v1.41.0"
},
"funding": [
{
=====================================
vendor/composer/installed.php
=====================================
@@ -3,7 +3,7 @@
'name' => 'icinga/icinga-php-library',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => '7972e82ffc6d3bdb84b2f8f0320a584ea3c119b5',
+ 'reference' => 'c1ff283d76a1e77f0fdb8666ec9b8c8e7d9ccb2d',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -65,9 +65,9 @@
'dev_requirement' => false,
),
'guzzlehttp/psr7' => array(
- 'pretty_version' => '2.12.3',
- 'version' => '2.12.3.0',
- 'reference' => '7ec62dc3f44aa218487dbed81a9bf9bc647be55d',
+ 'pretty_version' => '2.13.1',
+ 'version' => '2.13.1.0',
+ 'reference' => '95e7828100de18b4e269fb1703be530082d5166d',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
@@ -76,7 +76,7 @@
'icinga/icinga-php-library' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => '7972e82ffc6d3bdb84b2f8f0320a584ea3c119b5',
+ 'reference' => 'c1ff283d76a1e77f0fdb8666ec9b8c8e7d9ccb2d',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -287,9 +287,9 @@
'dev_requirement' => false,
),
'symfony/polyfill-php83' => array(
- 'pretty_version' => 'v1.38.2',
- 'version' => '1.38.2.0',
- 'reference' => '796a26abb75ce49f3a84433cd81bf1009d73d5f8',
+ 'pretty_version' => 'v1.41.0',
+ 'version' => '1.41.0.0',
+ 'reference' => '5ea99087fb99c273a9b9236ed4c31e78b16103c6',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php83',
'aliases' => array(),
=====================================
vendor/guzzlehttp/psr7/src/Header.php
=====================================
@@ -95,6 +95,8 @@ final class Header
*/
public static function normalize($header): array
{
+ \trigger_deprecation('guzzlehttp/psr7', '2.3', 'Header::normalize() is deprecated and will be removed in guzzlehttp/psr7 3.0. Use Header::splitList() instead.');
+
$result = [];
foreach ((array) $header as $value) {
foreach (self::splitList($value) as $parsed) {
@@ -142,7 +144,7 @@ final class Header
}
if (!$isQuoted && $value[$i] === ',') {
- $v = \trim($v);
+ $v = \trim($v, " \n\r\t\0\x0B");
if ($v !== '') {
$result[] = $v;
}
@@ -167,7 +169,7 @@ final class Header
$v .= $value[$i];
}
- $v = \trim($v);
+ $v = \trim($v, " \n\r\t\0\x0B");
if ($v !== '') {
$result[] = $v;
}
=====================================
vendor/guzzlehttp/psr7/src/Message.php
=====================================
@@ -19,7 +19,7 @@ final class Message
{
if ($message instanceof RequestInterface) {
$msg = trim($message->getMethod().' '
- .$message->getRequestTarget())
+ .$message->getRequestTarget(), " \n\r\t\0\x0B")
.' HTTP/'.$message->getProtocolVersion();
if (!$message->hasHeader('host')) {
$msg .= "\r\nHost: ".$message->getUri()->getHost();
@@ -33,7 +33,7 @@ final class Message
}
foreach ($message->getHeaders() as $name => $values) {
- if (is_string($name) && strtolower($name) === 'set-cookie') {
+ if (is_string($name) && Utils::asciiToLower($name) === 'set-cookie') {
foreach ($values as $value) {
$msg .= "\r\n{$name}: ".$value;
}
@@ -265,8 +265,10 @@ final class Message
$host = self::getHostFromHeaders($headers);
// If no host is found, then a full URI cannot be constructed.
+ // Collapse leading slashes so an origin-form target cannot be
+ // parsed as a network-path reference with its own authority.
if ($host === null) {
- return $path;
+ return self::normalizePathForOriginForm($path);
}
$scheme = substr($host, -4) === ':443' ? 'https' : 'http';
@@ -274,6 +276,15 @@ final class Message
return $scheme.'://'.$host.'/'.ltrim($path, '/');
}
+ private static function normalizePathForOriginForm(string $path): string
+ {
+ if (0 === strpos($path, '//')) {
+ return '/'.ltrim($path, '/');
+ }
+
+ return $path;
+ }
+
/**
* @param array $headers Array of headers (each value an array).
*/
@@ -283,7 +294,7 @@ final class Message
// Numeric array keys are converted to int by PHP.
$k = (string) $k;
- return strtolower($k) === 'host';
+ return Utils::asciiToLower($k) === 'host';
});
if (!$hostKey) {
@@ -349,7 +360,7 @@ final class Message
// According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2
// the space between status-code and reason-phrase is required. But
// browsers accept responses without space and reason as well.
- $responseStartLineMatch = preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line']);
+ $responseStartLineMatch = preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/D', $data['start-line']);
if ($responseStartLineMatch === false) {
throw new \RuntimeException('Unable to parse response start line: '.preg_last_error_msg());
=====================================
vendor/guzzlehttp/psr7/src/MessageTrait.php
=====================================
@@ -62,12 +62,12 @@ trait MessageTrait
public function hasHeader($header): bool
{
- return isset($this->headerNames[strtolower($header)]);
+ return isset($this->headerNames[Utils::asciiToLower($header)]);
}
public function getHeader($header): array
{
- $header = strtolower($header);
+ $header = Utils::asciiToLower($header);
if (!isset($this->headerNames[$header])) {
return [];
@@ -103,7 +103,7 @@ trait MessageTrait
}
}
$value = $this->normalizeHeaderValue($value);
- $normalized = strtolower($header);
+ $normalized = Utils::asciiToLower($header);
$new = clone $this;
if (isset($new->headerNames[$normalized])) {
@@ -135,7 +135,7 @@ trait MessageTrait
}
}
$value = $this->normalizeHeaderValue($value);
- $normalized = strtolower($header);
+ $normalized = Utils::asciiToLower($header);
$new = clone $this;
if (isset($new->headerNames[$normalized])) {
@@ -154,7 +154,7 @@ trait MessageTrait
*/
public function withoutHeader($header): MessageInterface
{
- $normalized = strtolower($header);
+ $normalized = Utils::asciiToLower($header);
if (!isset($this->headerNames[$normalized])) {
return $this;
@@ -218,7 +218,7 @@ trait MessageTrait
}
}
$value = $this->normalizeHeaderValue($value);
- $normalized = strtolower($header);
+ $normalized = Utils::asciiToLower($header);
if (isset($this->headerNames[$normalized])) {
$header = $this->headerNames[$normalized];
$this->headers[$header] = array_merge($this->headers[$header], $value);
=====================================
vendor/guzzlehttp/psr7/src/MimeType.php
=====================================
@@ -1300,6 +1300,6 @@ final class MimeType
*/
public static function fromExtension(string $extension): ?string
{
- return self::MIME_TYPES[strtolower($extension)] ?? null;
+ return self::MIME_TYPES[Utils::asciiToLower($extension)] ?? null;
}
}
=====================================
vendor/guzzlehttp/psr7/src/MultipartStream.php
=====================================
@@ -78,7 +78,7 @@ final class MultipartStream implements StreamInterface
$str .= "{$key}: {$value}\r\n";
}
- return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n";
+ return "--{$this->boundary}\r\n".trim($str, " \n\r\t\0\x0B")."\r\n\r\n";
}
/**
@@ -227,9 +227,9 @@ final class MultipartStream implements StreamInterface
*/
private static function getHeader(array $headers, string $key): ?string
{
- $lowercaseHeader = strtolower($key);
+ $lowercaseHeader = Utils::asciiToLower($key);
foreach ($headers as $k => $v) {
- if (strtolower((string) $k) === $lowercaseHeader) {
+ if (Utils::asciiToLower((string) $k) === $lowercaseHeader) {
return $v;
}
}
=====================================
vendor/guzzlehttp/psr7/src/Request.php
=====================================
@@ -47,7 +47,7 @@ class Request implements RequestInterface
}
self::warnOnMethodCasingChange($method);
- $this->method = strtoupper($method);
+ $this->method = Utils::asciiToUpper($method);
$this->uri = $uri;
$this->setHeaders($headers);
$this->protocol = $version;
@@ -108,7 +108,7 @@ class Request implements RequestInterface
$this->assertMethod($method);
self::warnOnMethodCasingChange($method);
$new = clone $this;
- $new->method = strtoupper($method);
+ $new->method = Utils::asciiToUpper($method);
return $new;
}
@@ -184,7 +184,7 @@ class Request implements RequestInterface
private static function warnOnMethodCasingChange(string $method): void
{
- if ($method !== strtoupper($method)) {
+ if ($method !== Utils::asciiToUpper($method)) {
\trigger_deprecation(
'guzzlehttp/psr7',
'2.11',
=====================================
vendor/guzzlehttp/psr7/src/ServerRequest.php
=====================================
@@ -165,7 +165,7 @@ class ServerRequest extends Request implements ServerRequestInterface
*/
public static function fromGlobals(): ServerRequestInterface
{
- $method = strtoupper(self::getServerParam('REQUEST_METHOD') ?? 'GET');
+ $method = Utils::asciiToUpper(self::getServerParam('REQUEST_METHOD') ?? 'GET');
$headers = self::removeInvalidHostHeader(self::getAllHeaders());
$uri = self::getUriFromGlobals();
$body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
@@ -220,7 +220,7 @@ class ServerRequest extends Request implements ServerRequestInterface
private static function removeInvalidHostHeader(array $headers): array
{
foreach ($headers as $name => $value) {
- if (strtolower((string) $name) !== 'host') {
+ if (Utils::asciiToLower((string) $name) !== 'host') {
continue;
}
@@ -269,7 +269,7 @@ class ServerRequest extends Request implements ServerRequestInterface
}
$serverPort = self::getServerParam('SERVER_PORT');
- if (!$hasPort && $serverPort !== null && preg_match('/^[+-]?\d+$/', $serverPort) === 1) {
+ if (!$hasPort && $serverPort !== null && preg_match('/^[+-]?\d+$/D', $serverPort) === 1) {
$uri = $uri->withPort((int) $serverPort);
}
=====================================
vendor/guzzlehttp/psr7/src/Uri.php
=====================================
@@ -99,9 +99,11 @@ class Uri implements UriInterface, \JsonSerializable
return self::parsePathNoSchemeReference($url);
}
- // Preserve bracketed IPv6 literals before encoding, including dotted IPv4 tails.
+ // Preserve bracketed IPv6 literals before encoding, including dotted IPv4
+ // tails. DEL (\x7F) is excluded so a raw-DEL host falls through to the
+ // general path and is rejected rather than silently mutated by parse_url().
$prefix = '';
- $ipv6Prefix = preg_match('%\A([0-9A-Za-z+.-]+://\[[^\]\x00-\x20/?#@]+\])(.*)\z%s', $url, $matches);
+ $ipv6Prefix = preg_match('%\A([0-9A-Za-z+.-]+://\[[^\]\x00-\x20\x7F/?#@]+\])(.*)\z%s', $url, $matches);
if ($ipv6Prefix === false) {
return false;
@@ -111,7 +113,11 @@ class Uri implements UriInterface, \JsonSerializable
/** @var array{0:string, 1:string, 2:string} $matches */
$suffix = $matches[2];
- if ($suffix !== '' && strpos(':/?#', $suffix[0]) === false) {
+ // After the bracketed host only an optional numeric port and/or a
+ // path, query, or fragment may follow. Anything else (for example
+ // `:80 at evil` or `:80x`) would let parse_url() reinterpret a
+ // different host.
+ if (preg_match('%\A(?::[0-9]*)?(?:[/?#].*)?\z%s', $suffix) !== 1) {
return false;
}
@@ -690,7 +696,7 @@ class Uri implements UriInterface, \JsonSerializable
throw new \InvalidArgumentException('Scheme must be a string');
}
- $scheme = \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ $scheme = Utils::asciiToLower($scheme);
if ($scheme !== '' && !preg_match('/^[a-z][a-z0-9.+-]*$/D', $scheme)) {
\trigger_deprecation(
@@ -733,7 +739,7 @@ class Uri implements UriInterface, \JsonSerializable
throw new \InvalidArgumentException('Host must be a string');
}
- $host = \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ $host = Utils::asciiToLower($host);
self::assertValidHost($host);
return $host;
=====================================
vendor/guzzlehttp/psr7/src/UriComparator.php
=====================================
@@ -19,7 +19,7 @@ final class UriComparator
*/
public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool
{
- if (\strcasecmp($original->getHost(), $modified->getHost()) !== 0) {
+ if (!Utils::caselessEquals($original->getHost(), $modified->getHost())) {
return true;
}
=====================================
vendor/guzzlehttp/psr7/src/UriNormalizer.php
=====================================
@@ -116,6 +116,11 @@ final class UriNormalizer
* treated equivalent which is not necessarily true according to RFC 3986. But that difference
* is highly uncommon in reality. So this potential normalization is implied in PSR-7 as well.
*
+ * When a normalization rewrites the path of a relative-path reference so that its first
+ * segment contains a colon, which would be mistaken for a scheme name (RFC 3986 Section 4.2),
+ * the path is prefixed with "./" instead of throwing, e.g. "a%41:" becomes "./aA:" as "aA:"
+ * would be an absolute URI with the scheme "aa".
+ *
* @param UriInterface $uri The URI to normalize
* @param int $flags A bitmask of normalizations to apply, see constants
*
@@ -156,7 +161,7 @@ final class UriNormalizer
throw new \RuntimeException('Unable to remove duplicate slashes from URI path: '.preg_last_error_msg());
}
- $uri = $uri->withPath($path);
+ $uri = self::withGuardedPath($uri, $path);
}
if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') {
@@ -192,11 +197,10 @@ final class UriNormalizer
$regex = '/(?:%[A-Fa-f0-9]{2})++/';
$callback = function (array $match): string {
- return strtoupper($match[0]);
+ return Utils::asciiToUpper($match[0]);
};
- return $uri
- ->withPath(self::normalizePercentEncodingInComponent($uri->getPath(), $regex, $callback))
+ return self::withGuardedPath($uri, self::normalizePercentEncodingInComponent($uri->getPath(), $regex, $callback))
->withQuery(self::normalizePercentEncodingInComponent($uri->getQuery(), $regex, $callback))
->withFragment(self::normalizePercentEncodingInComponent($uri->getFragment(), $regex, $callback));
}
@@ -209,12 +213,23 @@ final class UriNormalizer
return rawurldecode($match[0]);
};
- return $uri
- ->withPath(self::normalizePercentEncodingInComponent($uri->getPath(), $regex, $callback))
+ return self::withGuardedPath($uri, self::normalizePercentEncodingInComponent($uri->getPath(), $regex, $callback))
->withQuery(self::normalizePercentEncodingInComponent($uri->getQuery(), $regex, $callback))
->withFragment(self::normalizePercentEncodingInComponent($uri->getFragment(), $regex, $callback));
}
+ /**
+ * Writes the given path only when it differs from the current one, guarded so the write cannot throw.
+ */
+ private static function withGuardedPath(UriInterface $uri, string $path): UriInterface
+ {
+ if ($path === $uri->getPath()) {
+ return $uri;
+ }
+
+ return $uri->withPath(UriResolver::guardedPath($uri, $path));
+ }
+
/**
* @param callable(array): string $callback
*/
=====================================
vendor/guzzlehttp/psr7/src/UriResolver.php
=====================================
@@ -50,10 +50,36 @@ final class UriResolver
return $newPath;
}
+ /**
+ * Returns the path, prefixed with "./" when it would otherwise begin a relative-path reference with a segment
+ * containing a colon.
+ *
+ * Such a segment would be mistaken for a scheme name (RFC 3986 Section 4.2), so a URI without a scheme and
+ * authority cannot hold the path, but reference resolution and percent-encoding normalization can produce one.
+ * The "./" prefix the RFC prescribes resolves back to the same path.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
+ *
+ * @internal
+ */
+ public static function guardedPath(UriInterface $uri, string $path): string
+ {
+ if ($uri->getScheme() !== '' || $uri->getAuthority() !== '' || strpos(explode('/', $path, 2)[0], ':') === false) {
+ return $path;
+ }
+
+ return './'.$path;
+ }
+
/**
* Converts the relative URI into a new URI that is resolved against the base URI.
*
+ * When the resolved path is a relative-path reference whose first segment contains a colon,
+ * which would be mistaken for a scheme name (RFC 3986 Section 4.2), it is prefixed with "./",
+ * e.g. "./a:b".
+ *
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
*/
public static function resolve(UriInterface $base, UriInterface $rel): UriInterface
{
@@ -94,6 +120,10 @@ final class UriResolver
$targetQuery = $rel->getQuery();
}
+ if ($targetPath !== $base->getPath()) {
+ $targetPath = self::guardedPath($base, $targetPath);
+ }
+
return $base
->withPath($targetPath)
->withQuery($targetQuery)
=====================================
vendor/guzzlehttp/psr7/src/Utils.php
=====================================
@@ -10,6 +10,65 @@ use Psr\Http\Message\UriInterface;
final class Utils
{
+ /**
+ * Converts ASCII uppercase letters in a string to lowercase.
+ *
+ * Unlike strtolower(), which honors LC_CTYPE before PHP 8.2, the
+ * conversion is locale-independent and leaves every non-ASCII byte
+ * unchanged, as HTTP protocol elements require.
+ */
+ public static function asciiToLower(string $string): string
+ {
+ return strtr($string, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ }
+
+ /**
+ * Converts ASCII lowercase letters in a string to uppercase.
+ *
+ * Unlike strtoupper(), which honors LC_CTYPE before PHP 8.2, the
+ * conversion is locale-independent and leaves every non-ASCII byte
+ * unchanged, as HTTP protocol elements require.
+ */
+ public static function asciiToUpper(string $string): string
+ {
+ return strtr($string, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
+ }
+
+ /**
+ * Converts the first character of a string to uppercase when it is an
+ * ASCII lowercase letter.
+ *
+ * Unlike ucfirst(), which honors LC_CTYPE before PHP 8.2, the conversion
+ * is locale-independent and leaves every non-ASCII byte unchanged, as
+ * HTTP protocol elements require.
+ */
+ public static function asciiUcFirst(string $string): string
+ {
+ if ($string === '') {
+ return '';
+ }
+
+ return self::asciiToUpper($string[0]).substr($string, 1);
+ }
+
+ /**
+ * Checks whether the haystack contains the needle, comparing ASCII
+ * letters case-insensitively and without locale sensitivity.
+ */
+ public static function caselessContains(string $haystack, string $needle): bool
+ {
+ return str_contains(self::asciiToLower($haystack), self::asciiToLower($needle));
+ }
+
+ /**
+ * Checks whether two strings are equal, comparing ASCII letters
+ * case-insensitively and without locale sensitivity.
+ */
+ public static function caselessEquals(string $left, string $right): bool
+ {
+ return self::asciiToLower($left) === self::asciiToLower($right);
+ }
+
/**
* Remove the items given by the keys, case insensitively from the data.
*
@@ -20,11 +79,11 @@ final class Utils
$result = [];
foreach ($keys as &$key) {
- $key = strtolower((string) $key);
+ $key = self::asciiToLower((string) $key);
}
foreach ($data as $k => $v) {
- if (!in_array(strtolower((string) $k), $keys)) {
+ if (!in_array(self::asciiToLower((string) $k), $keys)) {
$result[$k] = $v;
}
}
@@ -212,7 +271,7 @@ final class Utils
if ($host !== '') {
if (isset($changes['set_headers']) && is_array($changes['set_headers'])) {
foreach (array_keys($changes['set_headers']) as $header) {
- if (strtolower((string) $header) === 'host') {
+ if (self::asciiToLower((string) $header) === 'host') {
throw new \InvalidArgumentException(
'Cannot modify request with both a URI containing a host and an explicit Host header.'
);
@@ -248,7 +307,7 @@ final class Utils
$hasHost = false;
foreach (array_keys($headers) as $header) {
- if (strtolower((string) $header) === 'host') {
+ if (self::asciiToLower((string) $header) === 'host') {
$hasHost = true;
break;
}
@@ -284,7 +343,7 @@ final class Utils
$addedHeaders = [];
foreach ($headers as $header => $value) {
$header = (string) $header;
- $normalized = strtolower($header);
+ $normalized = self::asciiToLower($header);
if (isset($addedHeaders[$normalized])) {
/** @var RequestInterface */
=====================================
vendor/symfony/polyfill-php83/bootstrap72.php
=====================================
@@ -11,6 +11,12 @@
use Symfony\Polyfill\Php83 as p;
+if (!class_exists('ValueError', false)) {
+ class ValueError extends Error
+ {
+ }
+}
+
if (extension_loaded('mbstring')) {
if (!function_exists('mb_str_pad')) {
/** @return string|false */
View it on GitLab: https://salsa.debian.org/nagios-team/icinga-php-library/-/compare/4eb1ab4d5e344e484ffaacd325c4bb73b3a920e9...bb4641dd6b618374fdfd4ac3d2df5493e4f1112d
--
View it on GitLab: https://salsa.debian.org/nagios-team/icinga-php-library/-/compare/4eb1ab4d5e344e484ffaacd325c4bb73b3a920e9...bb4641dd6b618374fdfd4ac3d2df5493e4f1112d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20260915/552a1a40/attachment-0001.htm>
More information about the pkg-nagios-changes
mailing list