diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-05-29 17:19:26 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-05-29 17:19:26 +0200 |
commit | ba6d285f40477d7d284e28efdf94039e1fc9ee5f (patch) | |
tree | 66fca81acaf9406bf081b3d4cf54fface4e144d2 | |
parent | e00d3fc0ba3da807791267ae16a7aa40e7445023 (diff) |
Prevent PHP to be executed when not going through index.php.
-rw-r--r-- | execute.php | 4 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | router.php | 4 | ||||
-rw-r--r-- | utils.php | 4 |
4 files changed, 14 insertions, 0 deletions
diff --git a/execute.php b/execute.php index 72f7d0b..49e04df 100644 --- a/execute.php +++ b/execute.php @@ -19,6 +19,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +if (!defined('LOOKING_GLASS01')) { + exit; +} + require_once 'config.php'; require_once 'router.php'; require_once 'utils.php'; @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +define('LOOKING_GLASS01', 1); + require_once 'config.php'; ?> <!DOCTYPE html> @@ -19,6 +19,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +if (!defined('LOOKING_GLASS01')) { + exit; +} + require_once 'config.php'; require_once 'utils.php'; @@ -19,6 +19,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +if (!defined('LOOKING_GLASS01')) { + exit; +} + function match_ipv4($ip) { return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); } |