Code formatting

This commit is contained in:
Miraty 2023-05-09 20:23:52 +02:00
parent f026b8b02d
commit cbf49408d1
2 changed files with 14 additions and 15 deletions

View file

@ -139,7 +139,6 @@ if ($_POST !== []) {
// Protect against cross-site request forgery if a POST request is received
if (isset($_SERVER['HTTP_SEC_FETCH_SITE']) !== true)
output(403, 'The <code>Sec-Fetch-Site</code> HTTP header is required when submitting a POST request to prevent Cross-Site Request Forgery (<abbr>CSRF</abbr>).');
if ($_SERVER['HTTP_SEC_FETCH_SITE'] !== 'same-origin')
if (!in_array($_SERVER['HTTP_SEC_FETCH_SITE'], ['none', 'same-origin'], true))
output(403, 'The <code>Sec-Fetch-Site</code> HTTP header must be <code>same-origin</code> or <code>none</code> when submitting a POST request to prevent Cross-Site Request Forgery (<abbr>CSRF</abbr>).');

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="<?= LOCALE ?>"<?php if (!empty(SERVICE)) echo ' class="' . SERVICE . '"'; ?>>
<html lang="<?= LOCALE ?>"<?= empty(SERVICE) ? '' : ' class="' . SERVICE . '"' ?>>
<head>
<meta charset="utf-8">
<title><?php