Code formatting
This commit is contained in:
parent
f026b8b02d
commit
cbf49408d1
2 changed files with 14 additions and 15 deletions
|
@ -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>).');
|
||||
|
||||
|
|
2
view.php
2
view.php
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue