aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-03-18 23:53:12 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-03-18 23:53:12 +0000
commitb651274960bf0d5277e67f1323cbe1cb797bcee5 (patch)
treee90ef02cb75bc9bdb5d2aa32753081a0b2761d5b /phpBB
parent812d5a2f35381f42ae67f4880f32aafef2b4fb5d (diff)
downloadforums-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')
-rw-r--r--phpBB/includes/auth.php5
-rwxr-xr-xphpBB/includes/emailer.php7
-rw-r--r--phpBB/includes/functions.php5
-rw-r--r--phpBB/includes/functions_admin.php5
-rw-r--r--phpBB/includes/functions_search.php5
-rw-r--r--phpBB/includes/functions_selects.php5
-rw-r--r--phpBB/includes/functions_validate.php5
-rw-r--r--phpBB/includes/prune.php5
-rw-r--r--phpBB/includes/sessions.php5
-rw-r--r--phpBB/includes/smtp.php7
-rw-r--r--phpBB/includes/sql_parse.php9
-rw-r--r--phpBB/includes/template.php5
-rw-r--r--phpBB/includes/topic_review.php12
-rw-r--r--phpBB/includes/usercp_activate.php2
-rw-r--r--phpBB/includes/usercp_avatar.php6
-rw-r--r--phpBB/includes/usercp_email.php2
-rw-r--r--phpBB/includes/usercp_register.php18
-rw-r--r--phpBB/includes/usercp_sendpasswd.php2
-rw-r--r--phpBB/includes/usercp_viewprofile.php2
19 files changed, 21 insertions, 91 deletions
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index fb62ee70a8..7acab748f0 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -20,11 +20,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
/*
$type's accepted (pre-pend with AUTH_):
VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, VOTECREATE,
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php
index fb6bdb6e94..f54a9d4f3e 100755
--- a/phpBB/includes/emailer.php
+++ b/phpBB/includes/emailer.php
@@ -19,11 +19,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
//
// The emailer class has support for attaching files, that isn't implemented
// in the 2.0 release but we can probable find some way of using it in a future
@@ -332,4 +327,4 @@ class emailer
} // class emailer
-?>
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 3bf9363e1b..11ca9fc642 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -21,11 +21,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
function get_db_stat($mode)
{
global $db;
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index db9a8ac80a..5d5df857fa 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -21,11 +21,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
//
// Simple version of jumpbox, just lists authed forums
//
diff --git a/phpBB/includes/functions_search.php b/phpBB/includes/functions_search.php
index 2a6b40c03f..325581101a 100644
--- a/phpBB/includes/functions_search.php
+++ b/phpBB/includes/functions_search.php
@@ -19,11 +19,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
{
// Weird, $init_match doesn't work with static when double quotes (") are used...
diff --git a/phpBB/includes/functions_selects.php b/phpBB/includes/functions_selects.php
index f4f2f7918d..9207094348 100644
--- a/phpBB/includes/functions_selects.php
+++ b/phpBB/includes/functions_selects.php
@@ -21,11 +21,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
//
// Pick a language, any language ...
//
diff --git a/phpBB/includes/functions_validate.php b/phpBB/includes/functions_validate.php
index c6f11bf87a..1f70cf2e7e 100644
--- a/phpBB/includes/functions_validate.php
+++ b/phpBB/includes/functions_validate.php
@@ -21,11 +21,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
//
// Check to see if the username has been taken, or if it is disallowed.
// Also checks if it includes the " character, which we don't allow in usernames.
diff --git a/phpBB/includes/prune.php b/phpBB/includes/prune.php
index 2d398692ea..90b143fead 100644
--- a/phpBB/includes/prune.php
+++ b/phpBB/includes/prune.php
@@ -20,11 +20,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
require($phpbb_root_path . 'includes/functions_search.'.$phpEx);
function prune($forum_id, $prune_date)
diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php
index 27cc20f49b..0ae53d7d16 100644
--- a/phpBB/includes/sessions.php
+++ b/phpBB/includes/sessions.php
@@ -20,11 +20,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
//
// session_begin()
//
diff --git a/phpBB/includes/smtp.php b/phpBB/includes/smtp.php
index 07253af7e7..1539855c77 100644
--- a/phpBB/includes/smtp.php
+++ b/phpBB/includes/smtp.php
@@ -19,11 +19,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
define('SMTP_INCLUDED', 1);
//
// This function has been modified as provided
@@ -233,4 +228,4 @@ function smtpmail($mail_to, $subject, $message, $headers = "")
return TRUE;
}
-?>
+?> \ No newline at end of file
diff --git a/phpBB/includes/sql_parse.php b/phpBB/includes/sql_parse.php
index d6c3660e1b..9761dd315c 100644
--- a/phpBB/includes/sql_parse.php
+++ b/phpBB/includes/sql_parse.php
@@ -28,11 +28,6 @@
*
\***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
//
// remove_comments will strip the sql comment lines out of an uploaded sql file
// specifically for mssql and postgres type files in the install....
@@ -67,6 +62,7 @@ function remove_comments(&$output)
unset($lines);
return $output;
}
+
//
// remove_remarks will strip the sql comment lines out of an uploaded sql file
//
@@ -192,4 +188,5 @@ function split_sql_file($sql, $delimiter)
return $output;
}
-?>
+
+?> \ No newline at end of file
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 16b59c01fd..3a15710a2c 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -20,11 +20,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
/**
* Template class. By Nathan Codding of the phpBB group.
* The interface was originally inspired by PHPLib templates,
diff --git a/phpBB/includes/topic_review.php b/phpBB/includes/topic_review.php
index e10a839afd..04667cef78 100644
--- a/phpBB/includes/topic_review.php
+++ b/phpBB/includes/topic_review.php
@@ -21,15 +21,6 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
-{
- die("Hacking attempt");
-}
-
-// -----------------------
-// Page specific functions
-//
-
function topic_review($topic_id, $is_inline_review)
{
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
@@ -216,8 +207,5 @@ function topic_review($topic_id, $is_inline_review)
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
}
-//
-// End page specific functions
-// ---------------------------
?> \ No newline at end of file
diff --git a/phpBB/includes/usercp_activate.php b/phpBB/includes/usercp_activate.php
index 358f62bf86..535c1f967f 100644
--- a/phpBB/includes/usercp_activate.php
+++ b/phpBB/includes/usercp_activate.php
@@ -21,7 +21,7 @@
*
***************************************************************************/
-if ( !defined('IN_PROFILE') )
+if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
diff --git a/phpBB/includes/usercp_avatar.php b/phpBB/includes/usercp_avatar.php
index 8e11e773bd..385316dbff 100644
--- a/phpBB/includes/usercp_avatar.php
+++ b/phpBB/includes/usercp_avatar.php
@@ -21,12 +21,6 @@
*
***************************************************************************/
-if ( !defined('IN_PROFILE') )
-{
- die("Hacking attempt");
- exit;
-}
-
function check_image_type(&$type, &$error, &$error_msg)
{
global $lang;
diff --git a/phpBB/includes/usercp_email.php b/phpBB/includes/usercp_email.php
index 3a7bd36375..7379927b66 100644
--- a/phpBB/includes/usercp_email.php
+++ b/phpBB/includes/usercp_email.php
@@ -21,7 +21,7 @@
*
***************************************************************************/
-if ( !defined('IN_PROFILE') )
+if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
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;
//
diff --git a/phpBB/includes/usercp_sendpasswd.php b/phpBB/includes/usercp_sendpasswd.php
index 44f999b2fc..779b898f94 100644
--- a/phpBB/includes/usercp_sendpasswd.php
+++ b/phpBB/includes/usercp_sendpasswd.php
@@ -21,7 +21,7 @@
*
***************************************************************************/
-if ( !defined('IN_PROFILE') )
+if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
diff --git a/phpBB/includes/usercp_viewprofile.php b/phpBB/includes/usercp_viewprofile.php
index 43fb940482..c164cf1e13 100644
--- a/phpBB/includes/usercp_viewprofile.php
+++ b/phpBB/includes/usercp_viewprofile.php
@@ -21,7 +21,7 @@
*
***************************************************************************/
-if ( !defined('IN_PROFILE') )
+if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;