Restrict test to real login response
authorJoey Schulze <joey@infodrom.org>
Thu, 4 Mar 2010 16:55:01 +0000 (17:55 +0100)
committerJoey Schulze <joey@infodrom.org>
Thu, 4 Mar 2010 16:55:01 +0000 (17:55 +0100)
lib/general.php

index 3f82f4a..9ec2941 100644 (file)
@@ -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: ./');