Upgrade to 3.9.0
This commit is contained in:
@@ -195,7 +195,7 @@ class Environment
|
||||
* Sets the host name, port, path and protocol from the
|
||||
* fixed list of allowed URLs
|
||||
*/
|
||||
protected function detectAllowed(array|string|object $allowed): void
|
||||
protected function detectAllowed(array|string $allowed): void
|
||||
{
|
||||
$allowed = A::wrap($allowed);
|
||||
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Kirby\Http\Request;
|
||||
|
||||
use SensitiveParameter;
|
||||
|
||||
/**
|
||||
* Base class for auth types
|
||||
*
|
||||
@@ -22,8 +24,10 @@ abstract class Auth
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct(string $data)
|
||||
{
|
||||
public function __construct(
|
||||
#[SensitiveParameter]
|
||||
string $data
|
||||
) {
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
|
@@ -4,6 +4,7 @@ namespace Kirby\Http\Request\Auth;
|
||||
|
||||
use Kirby\Http\Request\Auth;
|
||||
use Kirby\Toolkit\Str;
|
||||
use SensitiveParameter;
|
||||
|
||||
/**
|
||||
* HTTP basic authentication data
|
||||
@@ -20,8 +21,10 @@ class BasicAuth extends Auth
|
||||
protected string|null $password;
|
||||
protected string|null $username;
|
||||
|
||||
public function __construct(string $data)
|
||||
{
|
||||
public function __construct(
|
||||
#[SensitiveParameter]
|
||||
string $data
|
||||
) {
|
||||
parent::__construct($data);
|
||||
|
||||
$this->credentials = base64_decode($data);
|
||||
|
@@ -22,7 +22,7 @@ class Files
|
||||
/**
|
||||
* Sanitized array of all received files
|
||||
*/
|
||||
protected array $files;
|
||||
protected array $files = [];
|
||||
|
||||
/**
|
||||
* Creates a new Files object
|
||||
@@ -31,11 +31,7 @@ class Files
|
||||
*/
|
||||
public function __construct(array|null $files = null)
|
||||
{
|
||||
if ($files === null) {
|
||||
$files = $_FILES;
|
||||
}
|
||||
|
||||
$this->files = [];
|
||||
$files ??= $_FILES;
|
||||
|
||||
foreach ($files as $key => $file) {
|
||||
if (is_array($file['name'])) {
|
||||
|
@@ -178,6 +178,7 @@ class Response
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @todo Change return type to `never` once support for PHP 8.0 is dropped
|
||||
*/
|
||||
public static function go(string $url = '/', int $code = 302): void
|
||||
{
|
||||
|
@@ -117,7 +117,7 @@ class Router
|
||||
if ($callback) {
|
||||
$result = $callback($route);
|
||||
} else {
|
||||
$result = $route?->action()->call($route, ...$route->arguments());
|
||||
$result = $route->action()->call($route, ...$route->arguments());
|
||||
}
|
||||
|
||||
$loop = false;
|
||||
@@ -150,7 +150,7 @@ class Router
|
||||
* find matches and return all the found
|
||||
* arguments in the path.
|
||||
*/
|
||||
public function find(string $path, string $method, array|null $ignore = null): Route|null
|
||||
public function find(string $path, string $method, array|null $ignore = null): Route
|
||||
{
|
||||
if (isset($this->routes[$method]) === false) {
|
||||
throw new InvalidArgumentException('Invalid routing method: ' . $method, 400);
|
||||
|
@@ -5,6 +5,7 @@ namespace Kirby\Http;
|
||||
use Kirby\Cms\App;
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
use Kirby\Toolkit\Properties;
|
||||
use SensitiveParameter;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -326,8 +327,10 @@ class Uri
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setPassword(string|null $password = null): static
|
||||
{
|
||||
public function setPassword(
|
||||
#[SensitiveParameter]
|
||||
string|null $password = null
|
||||
): static {
|
||||
$this->password = $password;
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user