From 35b7cb5e83c8a07b4dc382a0e137f015e0d139bd Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Thu, 4 Mar 2010 17:55:01 +0100 Subject: [PATCH] Restrict test to real login response --- lib/general.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/general.php b/lib/general.php index 3f82f4a..9ec2941 100644 --- a/lib/general.php +++ b/lib/general.php @@ -13,7 +13,8 @@ function check_session() exit(); } - if (!empty($_POST['login']) && !empty($_POST['passwd'])) { + if (substr($_SERVER["SCRIPT_FILENAME"],-10) == '/index.php' && + !empty($_POST['login']) && !empty($_POST['passwd'])) { require_once('lib/login.php'); if (check_passwd()) { header('Location: ./'); -- 2.20.1