diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-18 23:53:12 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-18 23:53:12 +0000 |
| commit | b651274960bf0d5277e67f1323cbe1cb797bcee5 (patch) | |
| tree | e90ef02cb75bc9bdb5d2aa32753081a0b2761d5b /phpBB/includes/usercp_register.php | |
| parent | 812d5a2f35381f42ae67f4880f32aafef2b4fb5d (diff) | |
| download | forums-b651274960bf0d5277e67f1323cbe1cb797bcee5.tar forums-b651274960bf0d5277e67f1323cbe1cb797bcee5.tar.gz forums-b651274960bf0d5277e67f1323cbe1cb797bcee5.tar.bz2 forums-b651274960bf0d5277e67f1323cbe1cb797bcee5.tar.xz forums-b651274960bf0d5277e67f1323cbe1cb797bcee5.zip | |
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
Diffstat (limited to 'phpBB/includes/usercp_register.php')
| -rw-r--r-- | phpBB/includes/usercp_register.php | 18 |
1 files changed, 12 insertions, 6 deletions
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; // |
