+++ /dev/null
-../scssphp/scssphp/bin/pscss
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env php
+<?php
+
+/**
+ * Proxy PHP file generated by Composer
+ *
+ * This file includes the referenced bin path (../scssphp/scssphp/bin/pscss)
+ * using a stream wrapper to prevent the shebang from being output on PHP<8
+ *
+ * @generated
+ */
+
+namespace Composer;
+
+$GLOBALS['_composer_bin_dir'] = __DIR__;
+$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
+
+if (PHP_VERSION_ID < 80000) {
+ if (!class_exists('Composer\BinProxyWrapper')) {
+ /**
+ * @internal
+ */
+ final class BinProxyWrapper
+ {
+ private $handle;
+ private $position;
+ private $realpath;
+
+ public function stream_open($path, $mode, $options, &$opened_path)
+ {
+ // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
+ $opened_path = substr($path, 17);
+ $this->realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss';
"true/punycode": "~2.0",
"pear/net_idna2": "^0.2.0",
"scssphp/scssphp": "^1.3",
- "guzzlehttp/guzzle": "dev-6.5-woltlab"
+ "guzzlehttp/guzzle": "dev-6.5-woltlab",
+ "guzzlehttp/psr7": "dev-woltlab-1.6.1 as 1.6.1"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/WoltLab/guzzle",
"no-api": true
+ },
+ {
+ "type": "vcs",
+ "url": "https://github.com/WoltLab/guzzle-psr7",
+ "no-api": true
}
]
}
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e4709905ac8ea201053fb79a4a25e0da",
+ "content-hash": "1c5d2894e134ffd3d6d48cde54301194",
"packages": [
{
"name": "chrisjean/php-ico",
},
{
"name": "guzzlehttp/psr7",
- "version": "1.6.1",
+ "version": "dev-woltlab-1.6.1",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
+ "url": "https://github.com/WoltLab/guzzle-psr7",
+ "reference": "986596de01529f6e837a5cadfef9ec714ace7914"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
+ "url": "https://api.github.com/repos/WoltLab/guzzle-psr7/zipball/986596de01529f6e837a5cadfef9ec714ace7914",
+ "reference": "986596de01529f6e837a5cadfef9ec714ace7914",
"shasum": ""
},
"require": {
"src/functions_include.php"
]
},
- "notification-url": "https://packagist.org/downloads/",
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Tests\\Psr7\\": "tests/"
+ }
+ },
"license": [
"MIT"
],
"uri",
"url"
],
- "time": "2019-07-01T23:21:34+00:00"
+ "time": "2022-03-20T21:51:18+00:00"
},
{
"name": "pear/net_idna2",
}
],
"packages-dev": [],
- "aliases": [],
+ "aliases": [
+ {
+ "package": "guzzlehttp/psr7",
+ "version": "dev-woltlab-1.6.1",
+ "alias": "1.6.1",
+ "alias_normalized": "1.6.1.0"
+ }
+ ],
"minimum-stability": "stable",
"stability-flags": {
- "guzzlehttp/guzzle": 20
+ "guzzlehttp/guzzle": 20,
+ "guzzlehttp/psr7": 20
},
"prefer-stable": false,
"prefer-lowest": false,
/**
* @return string[] Array of classname => path
- * @psalm-var array<string, string>
+ * @psalm-return array<string, string>
*/
public function getClassMap()
{
<?php
+
+
+
+
+
+
+
+
+
+
namespace Composer;
use Composer\Semver\VersionParser;
),
'guzzlehttp/psr7' =>
array (
- 'pretty_version' => '1.6.1',
- 'version' => '1.6.1.0',
+ 'pretty_version' => 'dev-woltlab-1.6.1',
+ 'version' => 'dev-woltlab-1.6.1',
'aliases' =>
array (
+ 0 => '1.6.1',
),
- 'reference' => '239400de7a173fe9901b9ac7c06497751f00727a',
+ 'reference' => '986596de01529f6e837a5cadfef9ec714ace7914',
),
'pear/net_idna2' =>
array (
}
}
+/**
+ * @param string $fileIdentifier
+ * @param string $file
+ * @return void
+ */
function composerRequiref07e6bf6487a19c1ad4a7f66aa2be118($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- require $file;
-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+
+ require $file;
}
}
},
{
"name": "guzzlehttp/psr7",
- "version": "1.6.1",
- "version_normalized": "1.6.1.0",
+ "version": "dev-woltlab-1.6.1",
+ "version_normalized": "dev-woltlab-1.6.1",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
+ "url": "https://github.com/WoltLab/guzzle-psr7",
+ "reference": "986596de01529f6e837a5cadfef9ec714ace7914"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
+ "url": "https://api.github.com/repos/WoltLab/guzzle-psr7/zipball/986596de01529f6e837a5cadfef9ec714ace7914",
+ "reference": "986596de01529f6e837a5cadfef9ec714ace7914",
"shasum": ""
},
"require": {
"suggest": {
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
},
- "time": "2019-07-01T23:21:34+00:00",
+ "time": "2022-03-20T21:51:18+00:00",
"type": "library",
"extra": {
"branch-alias": {
"src/functions_include.php"
]
},
- "notification-url": "https://packagist.org/downloads/",
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Tests\\Psr7\\": "tests/"
+ }
+ },
"license": [
"MIT"
],
),
'guzzlehttp/psr7' =>
array (
- 'pretty_version' => '1.6.1',
- 'version' => '1.6.1.0',
+ 'pretty_version' => 'dev-woltlab-1.6.1',
+ 'version' => 'dev-woltlab-1.6.1',
'aliases' =>
array (
+ 0 => '1.6.1',
),
- 'reference' => '239400de7a173fe9901b9ac7c06497751f00727a',
+ 'reference' => '986596de01529f6e837a5cadfef9ec714ace7914',
),
'pear/net_idna2' =>
array (
}
}
+ /**
+ * @param mixed $value
+ *
+ * @return string[]
+ */
private function normalizeHeaderValue($value)
{
if (!is_array($value)) {
- return $this->trimHeaderValues([$value]);
+ return $this->trimAndValidateHeaderValues([$value]);
}
if (count($value) === 0) {
throw new \InvalidArgumentException('Header value can not be an empty array.');
}
- return $this->trimHeaderValues($value);
+ return $this->trimAndValidateHeaderValues($value);
}
/**
* header-field = field-name ":" OWS field-value OWS
* OWS = *( SP / HTAB )
*
- * @param string[] $values Header values
+ * @param mixed[] $values Header values
*
* @return string[] Trimmed header values
*
* @see https://tools.ietf.org/html/rfc7230#section-3.2.4
*/
- private function trimHeaderValues(array $values)
+ private function trimAndValidateHeaderValues(array $values)
{
return array_map(function ($value) {
if (!is_scalar($value) && null !== $value) {
));
}
- return trim((string) $value, " \t");
+ $trimmed = trim((string) $value, " \t");
+ $this->assertValue($trimmed);
+
+ return $trimmed;
}, $values);
}
+ /**
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2
+ *
+ * @param mixed $header
+ *
+ * @return void
+ */
private function assertHeader($header)
{
if (!is_string($header)) {
if ($header === '') {
throw new \InvalidArgumentException('Header name can not be empty.');
}
+
+ if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ '"%s" is not valid header name',
+ $header
+ )
+ );
+ }
+ }
+
+ /**
+ * @param string $value
+ *
+ * @return void
+ *
+ * @see https://tools.ietf.org/html/rfc7230#section-3.2
+ *
+ * field-value = *( field-content / obs-fold )
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+ * field-vchar = VCHAR / obs-text
+ * VCHAR = %x21-7E
+ * obs-text = %x80-FF
+ * obs-fold = CRLF 1*( SP / HTAB )
+ */
+ private function assertValue($value)
+ {
+ // The regular expression intentionally does not support the obs-fold production, because as
+ // per RFC 7230#3.2.4:
+ //
+ // A sender MUST NOT generate a message that includes
+ // line folding (i.e., that has any field-value that contains a match to
+ // the obs-fold rule) unless the message is intended for packaging
+ // within the message/http media type.
+ //
+ // Clients must not send a request with line folding and a server sending folded headers is
+ // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
+ // folding is not likely to break any legitimate use case.
+ if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) {
+ throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
+ }
}
}