From b651274960bf0d5277e67f1323cbe1cb797bcee5 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 18 Mar 2002 23:53:12 +0000 Subject: Stop being too paranoid about hacking of includes containing only fully inclusive functions git-svn-id: file:///svn/phpbb/trunk@2328 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/usercp_register.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/usercp_register.php') diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php index 3cc356ea97..da28d485c9 100644 --- a/phpBB/includes/usercp_register.php +++ b/phpBB/includes/usercp_register.php @@ -21,7 +21,7 @@ * ***************************************************************************/ -if ( !defined('IN_PROFILE') ) +if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); exit; @@ -476,20 +476,26 @@ if ( isset($HTTP_POST_VARS['submit']) ) FROM " . USERS_TABLE; if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, 'Could not obtained next user_id information', '', __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); } - $row = $db->sql_fetchrow($result); + if ( !($row = $db->sql_fetchrow($result) ) + { + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); + } $user_id = $row['total'] + 1; $sql = "SELECT MAX(group_id) AS total FROM " . GROUPS_TABLE; - if (!( $result = $db->sql_query($sql)) ) + if ( !($result = $db->sql_query($sql) ) ) { - message_die(GENERAL_ERROR, 'Could not obtained next user_id information', '', __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); } - $row = $db->sql_fetchrow($result); + if ( !($row = $db->sql_fetchrow($result) ) + { + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); + } $group_id = $row['total'] + 1; // -- cgit v1.2.1