From 9e3d77af37357f990006f8b6b2c6050d405a3edf Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:14:28 +0100 Subject: [PATCH] Improve ffcnr reponse codes --- ffcnr.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ffcnr.php b/ffcnr.php index 56b53727..b169594b 100644 --- a/ffcnr.php +++ b/ffcnr.php @@ -22,6 +22,11 @@ header( 'X-Frame-Options: DENY' ); header( 'Referrer-Policy: no-referrer' ); header( "Content-Security-Policy: default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; object-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none';" ); // Just because +if ( ! ( $_REQUEST['action'] ?? 0 ) ) { + header( 'HTTP/1.1 204 No Content' ); + exit; +} + if ( isset( $_SERVER['DOCUMENT_ROOT'] ) && file_exists( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' ) ) { require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php'; } else { @@ -37,3 +42,6 @@ if ( isset( $_SERVER['DOCUMENT_ROOT'] ) && file_exists( $_SERVER['DOCUMENT_ROOT' } require_once __DIR__ . '/includes/functions/requests/_setup.php'; + +header( 'HTTP/1.1 400 Bad Request' ); +exit;