Resolve #585 by allowing additional Sec-Fetch rules

This commit is contained in:
the-djmaze 2022-11-09 11:19:05 +01:00
parent 3992d9d5f7
commit 895abd09be
3 changed files with 42 additions and 3 deletions

View file

@ -101,7 +101,7 @@ abstract class Service
$sResult = '';
if (\count($aPaths) && !empty($aPaths[0]) && 'index' !== \strtolower($aPaths[0]))
{
if ('mailto' !== \strtolower($aPaths[0]) && !\SnappyMail\HTTP\SecFetch::isSameOrigin()) {
if ('mailto' !== \strtolower($aPaths[0]) && !\SnappyMail\HTTP\SecFetch::matchAnyRule($oConfig->Get('security', 'secfetch_allow', ''))) {
\MailSo\Base\Http::StatusHeader(403);
echo $oServiceActions->ErrorTemplates('Access Denied.',
"Disallowed Sec-Fetch