From 10e6d03eb4e081712db89125a8c79317af0d57ad Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 19 Nov 2018 09:15:23 -0800 Subject: [PATCH 1/2] Simplify instanceof checking --- system/HTTP/Files/FileCollection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/HTTP/Files/FileCollection.php b/system/HTTP/Files/FileCollection.php index 4f346cb1c85a..e01e1b26c510 100644 --- a/system/HTTP/Files/FileCollection.php +++ b/system/HTTP/Files/FileCollection.php @@ -92,7 +92,7 @@ public function getFile(string $name) { $name = explode('.', $name); $uploadedFile = $this->getValueDotNotationSyntax($name, $this->files); - if ($uploadedFile instanceof \CodeIgniter\HTTP\Files\UploadedFile) + if ($uploadedFile instanceof UploadedFile) { return $uploadedFile; } @@ -103,7 +103,7 @@ public function getFile(string $name) if (array_key_exists($name, $this->files)) { $uploadedFile = $this->files[$name]; - if ($uploadedFile instanceof \CodeIgniter\HTTP\Files\UploadedFile) + if ($uploadedFile instanceof UploadedFile) { return $uploadedFile; } From 839c1e2beec2fcd18546d0a878b800bf04dccbaf Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 19 Nov 2018 09:50:37 -0800 Subject: [PATCH 2/2] More secure redirection --- system/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Common.php b/system/Common.php index 1d45a7bb0327..1814c882d4dd 100644 --- a/system/Common.php +++ b/system/Common.php @@ -818,7 +818,7 @@ function redirect(string $uri = null) if (! empty($uri)) { - return $response->to($uri); + return $response->route($uri); } return $response;