Upgrade to 3.9.0

This commit is contained in:
Bastian Allgeier
2023-01-17 14:50:16 +01:00
parent 0ebe0c7b16
commit 6e5c9d1f48
132 changed files with 1664 additions and 1254 deletions

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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'])) {