From 09fd0434cbec23b278fd6f6b3bf820e05c9035d1 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst Date: Wed, 27 Sep 2023 20:31:16 +0200 Subject: [PATCH 1/3] Request access: make form indicate that motivation is required Currently upon submitting, the form is not accepted when motivation is left empty, however there's no form feedback beforehand or in fact anytime, the form just doesn't submit. We fix this the easy way by adding the required '*' indicator and using browser form validation to require the form to be filled in. --- .../View/Proxy/Partials/WAYF/noAccess/requestForm.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/base/templates/modules/Authentication/View/Proxy/Partials/WAYF/noAccess/requestForm.html.twig b/theme/base/templates/modules/Authentication/View/Proxy/Partials/WAYF/noAccess/requestForm.html.twig index c0da1de04d..95505216db 100644 --- a/theme/base/templates/modules/Authentication/View/Proxy/Partials/WAYF/noAccess/requestForm.html.twig +++ b/theme/base/templates/modules/Authentication/View/Proxy/Partials/WAYF/noAccess/requestForm.html.twig @@ -51,9 +51,9 @@ {% include '@theme/Authentication/View/Proxy/Partials/WAYF/noAccess/ctas.html.twig' %} From bad48c671889191bdb8892dafcd415922ec60405 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst Date: Wed, 27 Sep 2023 21:57:04 +0200 Subject: [PATCH 2/3] Request access: set from to to address. In modern times we cannot expect to be able to send email "From" the user's entered email address from our systems. Use the To address instead which we have available and belongs to us. --- src/OpenConext/EngineBlock/Service/RequestAccessMailer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php b/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php index 2c799384da..77c572fe15 100644 --- a/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php +++ b/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php @@ -94,7 +94,7 @@ public function sendRequestAccessEmailForIdp($spName, $spEntityId, $institution, $message = new Swift_Message(); $message ->setSubject($subject) - ->setFrom($email, $name) + ->setFrom($this->requestAccessEmailAddress) ->setTo($this->requestAccessEmailAddress) ->setBody($body, 'text/plain'); @@ -127,7 +127,7 @@ public function sendRequestAccessEmailForInstitution($spName, $spEntityId, $inst $message = new Swift_Message(); $message ->setSubject($subject) - ->setFrom($email, $name) + ->setFrom($this->requestAccessEmailAddress) ->setTo($this->requestAccessEmailAddress) ->setBody($body, 'text/plain'); From 6f6c9b9c22eaacc62c5bae80155511482cb5448b Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst Date: Thu, 28 Sep 2023 10:08:14 +0200 Subject: [PATCH 3/3] Comment about value of From address --- src/OpenConext/EngineBlock/Service/RequestAccessMailer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php b/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php index 77c572fe15..9eefed4a4a 100644 --- a/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php +++ b/src/OpenConext/EngineBlock/Service/RequestAccessMailer.php @@ -91,6 +91,8 @@ public function sendRequestAccessEmailForIdp($spName, $spEntityId, $institution, $comment ); + // We use the destination email address also as a From since we do + // not have a better generic sender address available currently. $message = new Swift_Message(); $message ->setSubject($subject)