Upgrade to 3.9.0
This commit is contained in:
@@ -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'])) {
|
||||
|
||||
Reference in New Issue
Block a user