mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 11:01:48 +02:00
Remove user facing session_id checks, they remain in admin and mod panels, fix bug which allows sending email via board even when disabled
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3481 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -152,6 +152,7 @@ define('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');
|
||||
define('BANLIST_TABLE', $table_prefix.'banlist');
|
||||
define('CATEGORIES_TABLE', $table_prefix.'categories');
|
||||
define('CONFIG_TABLE', $table_prefix.'config');
|
||||
define('CONFIRM_TABLE', $table_prefix.'confirm');
|
||||
define('DISALLOW_TABLE', $table_prefix.'disallow');
|
||||
define('FORUMS_TABLE', $table_prefix.'forums');
|
||||
define('GROUPS_TABLE', $table_prefix.'groups');
|
||||
|
@@ -222,7 +222,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||
|
||||
$current_time = time();
|
||||
|
||||
if ($mode == 'newtopic' || $mode == 'reply')
|
||||
if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost')
|
||||
{
|
||||
//
|
||||
// Flood control
|
||||
@@ -242,7 +242,8 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($mode == 'editpost')
|
||||
|
||||
if ($mode == 'editpost')
|
||||
{
|
||||
remove_search_post($post_id);
|
||||
}
|
||||
|
@@ -27,6 +27,12 @@ if ( !defined('IN_PHPBB') )
|
||||
exit;
|
||||
}
|
||||
|
||||
// Is send through board enabled? No, return to index
|
||||
if (!$board_config['board_email_form'])
|
||||
{
|
||||
redirect(append_sid("index.$phpEx"));
|
||||
}
|
||||
|
||||
if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) || !empty($HTTP_POST_VARS[POST_USERS_URL]) )
|
||||
{
|
||||
$user_id = ( !empty($HTTP_GET_VARS[POST_USERS_URL]) ) ? intval($HTTP_GET_VARS[POST_USERS_URL]) : intval($HTTP_POST_VARS[POST_USERS_URL]);
|
||||
@@ -61,12 +67,6 @@ if ( $result = $db->sql_query($sql) )
|
||||
|
||||
if ( isset($HTTP_POST_VARS['submit']) )
|
||||
{
|
||||
// session id check
|
||||
if ($sid == '' || $sid != $userdata['session_id'])
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Invalid_session');
|
||||
}
|
||||
|
||||
$error = FALSE;
|
||||
|
||||
if ( !empty($HTTP_POST_VARS['subject']) )
|
||||
@@ -175,7 +175,7 @@ if ( $result = $db->sql_query($sql) )
|
||||
$template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
|
||||
'S_HIDDEN_FIELDS' => '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />',
|
||||
'S_HIDDEN_FIELDS' => '',
|
||||
'S_POST_ACTION' => append_sid("profile.$phpEx?&mode=email&" . POST_USERS_URL . "=$user_id"),
|
||||
|
||||
'L_SEND_EMAIL_MSG' => $lang['Send_email_msg'],
|
||||
|
@@ -46,8 +46,8 @@ function show_coppa()
|
||||
"AGREE_UNDER_13" => $lang['Agree_under_13'],
|
||||
'DO_NOT_AGREE' => $lang['Agree_not'],
|
||||
|
||||
"U_AGREE_OVER13" => "profile.$phpEx?mode=register&agreed=true&sid=" . $userdata['session_id'],
|
||||
"U_AGREE_UNDER13" => "profile.$phpEx?mode=register&agreed=true&coppa=true&sid=" . $userdata['session_id'])
|
||||
"U_AGREE_OVER13" => "profile.$phpEx?mode=register&agreed=true",
|
||||
"U_AGREE_UNDER13" => "profile.$phpEx?mode=register&agreed=true&coppa=true")
|
||||
);
|
||||
|
||||
$template->pparse('body');
|
||||
@@ -80,12 +80,6 @@ if (
|
||||
isset($HTTP_POST_VARS['cancelavatar']) ||
|
||||
$mode == 'register' )
|
||||
{
|
||||
// session id check
|
||||
if ($sid == '' || $sid != $userdata['session_id'])
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Invalid_session');
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
|
||||
@@ -765,7 +759,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
|
||||
if( $mode == 'editprofile' )
|
||||
{
|
||||
$s_hidden_fields .= '<input type="hidden" name="user_id" value="' . $userdata['user_id'] . '" />';
|
||||
|
@@ -29,12 +29,6 @@ if ( !defined('IN_PHPBB') )
|
||||
|
||||
if ( isset($HTTP_POST_VARS['submit']) )
|
||||
{
|
||||
// session id check
|
||||
if ($sid == '' || $sid != $userdata['session_id'])
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Invalid_session');
|
||||
}
|
||||
|
||||
$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags($HTTP_POST_VARS['username'])) : '';
|
||||
$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['email']))) : '';
|
||||
|
||||
@@ -133,7 +127,7 @@ $template->assign_vars(array(
|
||||
'L_SUBMIT' => $lang['Submit'],
|
||||
'L_RESET' => $lang['Reset'],
|
||||
|
||||
'S_HIDDEN_FIELDS' => '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />',
|
||||
'S_HIDDEN_FIELDS' => '',
|
||||
'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=sendpassword"))
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user