More updates

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3172 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-12-03 20:34:54 +00:00
parent 84696ccc75
commit 32830195ee
5 changed files with 12 additions and 10 deletions

View file

@ -28,7 +28,7 @@ function language_select($default, $select_name = "language", $dirname="language
{ {
global $phpEx, $phpbb_root_path; global $phpEx, $phpbb_root_path;
$dir = opendir($phpbb_root_path . $dirname); $dir = opendir(realpath($dirname));
$lang = array(); $lang = array();
while ( $file = readdir($dir) ) while ( $file = readdir($dir) )

View file

@ -273,7 +273,7 @@ if ( $userdata['session_logged_in'] )
else else
{ {
$s_privmsg_new = 0; $s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg']; $icon_pm = $images['pm_new_msg'];
} }
} }
else else

View file

@ -61,7 +61,8 @@ if ( $result = $db->sql_query($sql) )
if ( isset($HTTP_POST_VARS['submit']) ) if ( isset($HTTP_POST_VARS['submit']) )
{ {
if (!isset($HTTP_POST_VARS['sid']) || $HTTP_POST_VARS['sid'] != $userdata['session_id']) // session id check
if ($sid == '' || $sid != $userdata['session_id'])
{ {
message_die(ERROR, 'Invalid_session'); message_die(ERROR, 'Invalid_session');
} }

View file

@ -33,7 +33,7 @@ if ( !defined('IN_PHPBB') )
// //
function show_coppa() function show_coppa()
{ {
global $template, $lang, $phpbb_root_path, $phpEx; global $userdata, $template, $lang, $phpbb_root_path, $phpEx;
$template->set_filenames(array( $template->set_filenames(array(
'body' => 'agreement.tpl') 'body' => 'agreement.tpl')
@ -46,8 +46,8 @@ function show_coppa()
"AGREE_UNDER_13" => $lang['Agree_under_13'], "AGREE_UNDER_13" => $lang['Agree_under_13'],
'DO_NOT_AGREE' => $lang['Agree_not'], 'DO_NOT_AGREE' => $lang['Agree_not'],
"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&agreed=true"), "U_AGREE_OVER13" => "profile.$phpEx?mode=register&agreed=true&sid=" . $userdata['session_id'],
"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&agreed=true&coppa=true")) "U_AGREE_UNDER13" => "profile.$phpEx?mode=register&agreed=true&coppa=true&sid=" . $userdata['session_id'])
); );
$template->pparse('body'); $template->pparse('body');
@ -80,9 +80,10 @@ if (
isset($HTTP_POST_VARS['cancelavatar']) || isset($HTTP_POST_VARS['cancelavatar']) ||
$mode == 'register' ) $mode == 'register' )
{ {
if (!isset($HTTP_POST_VARS['sid']) || $HTTP_POST_VARS['sid'] != $userdata['session_id']) // session id check
if ($sid == '' || $sid != $userdata['session_id'])
{ {
message_die(ERROR, 'Invalid_session_id'); message_die(ERROR, 'Invalid_session');
} }
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
@ -246,7 +247,6 @@ if ( isset($HTTP_POST_VARS['submit']) )
$error = TRUE; $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty']; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
} }
} }
$passwd_sql = ''; $passwd_sql = '';

View file

@ -29,7 +29,8 @@ if ( !defined('IN_PHPBB') )
if ( isset($HTTP_POST_VARS['submit']) ) if ( isset($HTTP_POST_VARS['submit']) )
{ {
if (!isset($HTTP_POST_VARS['sid']) || $HTTP_POST_VARS['sid'] != $userdata['session_id']) // session id check
if ($sid == '' || $sid != $userdata['session_id'])
{ {
message_die(ERROR, 'Invalid_session'); message_die(ERROR, 'Invalid_session');
} }