diff --git a/app/img/wifi-qr-code.php b/app/img/wifi-qr-code.php index 92e9dce3..d89ef077 100644 --- a/app/img/wifi-qr-code.php +++ b/app/img/wifi-qr-code.php @@ -4,6 +4,12 @@ require_once '../../includes/config.php'; require_once '../../includes/defaults.php'; require_once '../../includes/functions.php'; +// prevent direct file access +if (basename($_SERVER['PHP_SELF']) === basename(__FILE__)) { + header('HTTP/1.0 403 Forbidden'); + exit; +} + function qr_encode($str) { return preg_replace('/(?