From cbf49408d171b9d8b0769f8122120198a3a75eb8 Mon Sep 17 00:00:00 2001
From: Miraty Sec-Fetch-Site
HTTP header is required when submitting a POST request to prevent Cross-Site Request Forgery (CSRF).');
- if ($_SERVER['HTTP_SEC_FETCH_SITE'] !== 'same-origin')
if (!in_array($_SERVER['HTTP_SEC_FETCH_SITE'], ['none', 'same-origin'], true))
output(403, 'The Sec-Fetch-Site
HTTP header must be same-origin
or none
when submitting a POST request to prevent Cross-Site Request Forgery (CSRF).');
diff --git a/view.php b/view.php
index 1f30b8d..1ee3060 100644
--- a/view.php
+++ b/view.php
@@ -1,14 +1,14 @@
->
+>
' . _('This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it.') . '
'; - require ROOT_PATH . '/pg-view/' . PAGE_ADDRESS . '.php'; +require ROOT_PATH . '/pg-view/' . PAGE_ADDRESS . '.php'; - if ($_POST === [] AND PAGE_METADATA['require-login'] ?? true !== false AND !isset($_SESSION['id']) AND PAGE_TERMINAL) - echo '' . sprintf(_('This form won\'t be accepted because you need to %slog in%s first.'), '', '') . '
'; +if ($_POST === [] AND PAGE_METADATA['require-login'] ?? true !== false AND !isset($_SESSION['id']) AND PAGE_TERMINAL) + echo '' . sprintf(_('This form won\'t be accepted because you need to %slog in%s first.'), '', '') . '
'; - displayFinalMessage($data); +displayFinalMessage($data); ?>