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
This commit is contained in:
Paul S. Owen 2002-03-18 23:53:12 +00:00
parent 812d5a2f35
commit b651274960
19 changed files with 21 additions and 91 deletions

View file

@ -20,11 +20,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
/* /*
$type's accepted (pre-pend with AUTH_): $type's accepted (pre-pend with AUTH_):
VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, VOTECREATE, VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, VOTECREATE,

View file

@ -19,11 +19,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
// //
// The emailer class has support for attaching files, that isn't implemented // 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 // in the 2.0 release but we can probable find some way of using it in a future

View file

@ -21,11 +21,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
function get_db_stat($mode) function get_db_stat($mode)
{ {
global $db; global $db;

View file

@ -21,11 +21,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
// //
// Simple version of jumpbox, just lists authed forums // Simple version of jumpbox, just lists authed forums
// //

View file

@ -19,11 +19,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
function clean_words($mode, &$entry, &$stopword_list, &$synonym_list) function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
{ {
// Weird, $init_match doesn't work with static when double quotes (") are used... // Weird, $init_match doesn't work with static when double quotes (") are used...

View file

@ -21,11 +21,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
// //
// Pick a language, any language ... // Pick a language, any language ...
// //

View file

@ -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. // 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. // Also checks if it includes the " character, which we don't allow in usernames.

View file

@ -20,11 +20,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
require($phpbb_root_path . 'includes/functions_search.'.$phpEx); require($phpbb_root_path . 'includes/functions_search.'.$phpEx);
function prune($forum_id, $prune_date) function prune($forum_id, $prune_date)

View file

@ -20,11 +20,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
// //
// session_begin() // session_begin()
// //

View file

@ -19,11 +19,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
define('SMTP_INCLUDED', 1); define('SMTP_INCLUDED', 1);
// //
// This function has been modified as provided // This function has been modified as provided

View file

@ -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 // remove_comments will strip the sql comment lines out of an uploaded sql file
// specifically for mssql and postgres type files in the install.... // specifically for mssql and postgres type files in the install....
@ -67,6 +62,7 @@ function remove_comments(&$output)
unset($lines); unset($lines);
return $output; return $output;
} }
// //
// remove_remarks will strip the sql comment lines out of an uploaded sql file // 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; return $output;
} }
?> ?>

View file

@ -20,11 +20,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
/** /**
* Template class. By Nathan Codding of the phpBB group. * Template class. By Nathan Codding of the phpBB group.
* The interface was originally inspired by PHPLib templates, * The interface was originally inspired by PHPLib templates,

View file

@ -21,15 +21,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
// -----------------------
// Page specific functions
//
function topic_review($topic_id, $is_inline_review) function topic_review($topic_id, $is_inline_review)
{ {
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; 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); include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
} }
} }
//
// End page specific functions
// ---------------------------
?> ?>

View file

@ -21,7 +21,7 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PROFILE') ) if ( !defined('IN_PHPBB') )
{ {
die("Hacking attempt"); die("Hacking attempt");
exit; exit;

View file

@ -21,12 +21,6 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PROFILE') )
{
die("Hacking attempt");
exit;
}
function check_image_type(&$type, &$error, &$error_msg) function check_image_type(&$type, &$error, &$error_msg)
{ {
global $lang; global $lang;

View file

@ -21,7 +21,7 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PROFILE') ) if ( !defined('IN_PHPBB') )
{ {
die("Hacking attempt"); die("Hacking attempt");
exit; exit;

View file

@ -21,7 +21,7 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PROFILE') ) if ( !defined('IN_PHPBB') )
{ {
die("Hacking attempt"); die("Hacking attempt");
exit; exit;
@ -476,20 +476,26 @@ if ( isset($HTTP_POST_VARS['submit']) )
FROM " . USERS_TABLE; FROM " . USERS_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);
}
$user_id = $row['total'] + 1; $user_id = $row['total'] + 1;
$sql = "SELECT MAX(group_id) AS total $sql = "SELECT MAX(group_id) AS total
FROM " . GROUPS_TABLE; 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; $group_id = $row['total'] + 1;
// //

View file

@ -21,7 +21,7 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PROFILE') ) if ( !defined('IN_PHPBB') )
{ {
die("Hacking attempt"); die("Hacking attempt");
exit; exit;

View file

@ -21,7 +21,7 @@
* *
***************************************************************************/ ***************************************************************************/
if ( !defined('IN_PROFILE') ) if ( !defined('IN_PHPBB') )
{ {
die("Hacking attempt"); die("Hacking attempt");
exit; exit;