From 9f6d873a984073307f9dd7cb52e730b2046b3893 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 15 Mar 2022 13:48:50 +0000 Subject: [PATCH 1/3] Quick fix into the auth definition file --- skeleton/meta/definitions/auth.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skeleton/meta/definitions/auth.php b/skeleton/meta/definitions/auth.php index 3f0f062..c07a3d9 100644 --- a/skeleton/meta/definitions/auth.php +++ b/skeleton/meta/definitions/auth.php @@ -4,6 +4,8 @@ use function DI\autowire, DI\create, DI\get; use %NAMESPACE%\Entity; +use Psr\Http\Message\ServerRequestInterface; + use Ulmus\Entity\Field\Datetime, Ulmus\User\Lib\Authenticate; @@ -17,7 +19,7 @@ use Picea\Picea; use TheBugs\Email\{ EmailConfiguration, MailerInterface, SwiftMailer }; -use Taxus\Taxus; +use Taxus\{ Taxus, PermissionGrantInterface }; return [ Entity\User::class => autowire(Entity\User::class), @@ -25,7 +27,7 @@ return [ Authenticate::class => create(Authenticate::class)->constructor(get(Session::class), get(Cookie::class), get('authentication.method')), SecurityHandler::class => create(SecurityHandler::class)->constructor(function() { - return new RedirectResponse(getenv("URL_BASE")."/connexion"); + return new RedirectResponse(getenv("URL_BASE")."/login"); }, get('authentication.unauthorize'), get(Taxus::class)), 'authentication.error' => function($c, Picea $picea) { From 06313396f540e093eb8251a70a04be6a79119a6b Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 15 Mar 2022 15:18:52 +0000 Subject: [PATCH 2/3] - Added a try/catch on the Kernel load --- skeleton/public/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/skeleton/public/index.php b/skeleton/public/index.php index eb8a548..52f18c1 100644 --- a/skeleton/public/index.php +++ b/skeleton/public/index.php @@ -1,3 +1,8 @@ getMessage(); +} \ No newline at end of file From 73aa22942fb75f143c3361e29456b10086eff9be Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 15 Mar 2022 15:57:01 +0000 Subject: [PATCH 3/3] - Added forcing https in the htaccess on need --- skeleton/public/.htaccess | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skeleton/public/.htaccess b/skeleton/public/.htaccess index b3bd338..11311da 100644 --- a/skeleton/public/.htaccess +++ b/skeleton/public/.htaccess @@ -1,6 +1,10 @@ RewriteEngine On + # Force HTTPS (disabled by default) + # RewriteCond %{HTTPS} off + # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # Remove trailing slashes from request URL RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$