|
From: Paul S. O. <ps...@us...> - 2002-01-08 18:38:59
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv21004
Modified Files:
profile.php
Log Message:
Fix bug #500525
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.165
retrieving revision 1.166
diff -C2 -r1.165 -r1.166
*** profile.php 2002/01/07 18:50:30 1.165
--- profile.php 2002/01/08 18:38:56 1.166
***************
*** 740,744 ****
if( $user_avatar_loc != "" )
{
! if( file_exists($user_avatar_loc) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
{
if( $user_avatar_size <= $board_config['avatar_filesize'] && $avatar_size > 0)
--- 740,744 ----
if( $user_avatar_loc != "" )
{
! if( file_exists($user_avatar_loc) && ereg(".jpg$|.jpeg$|.gif$|.png$", $user_avatar_name) )
{
if( $user_avatar_size <= $board_config['avatar_filesize'] && $avatar_size > 0)
***************
*** 957,961 ****
}
! if( preg_match("#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+\/.*?\.(gif|jpg|png)$)#is", $user_avatar_remoteurl) )
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_remoteurl) . "', user_avatar_type = " . USER_AVATAR_REMOTE;
--- 957,961 ----
}
! if( preg_match("#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+\/.*?\.(gif|jpg|jpeg|png)$)#is", $user_avatar_remoteurl) )
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_remoteurl) . "', user_avatar_type = " . USER_AVATAR_REMOTE;
***************
*** 1330,1334 ****
while( $sub_file = @readdir($sub_dir) )
{
! if( preg_match("/(\.gif$|\.png$|\.jpg)$/is", $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . "/" . $sub_file;
--- 1330,1334 ----
while( $sub_file = @readdir($sub_dir) )
{
! if( preg_match("/(\.gif$|\.png$|\.jpg|\.jpeg)$/is", $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . "/" . $sub_file;
***************
*** 1663,1668 ****
if( isset($HTTP_POST_VARS['submit']) )
{
! $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']))) : "";
$sql = "SELECT user_id, username, user_email, user_active, user_lang
--- 1663,1668 ----
if( isset($HTTP_POST_VARS['submit']) )
{
! $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']))) : "";
$sql = "SELECT user_id, username, user_email, user_active, user_lang
***************
*** 1679,1689 ****
$row = $db->sql_fetchrow($result);
! $username = $row['username'];
!
! if($row['user_active'] == 0)
{
message_die(GENERAL_MESSAGE, $lang['No_send_account_inactive']);
}
!
$user_actkey = generate_activation_key();
$user_password = generate_password();
--- 1679,1689 ----
$row = $db->sql_fetchrow($result);
! if( $row['user_active'] == 0 )
{
message_die(GENERAL_MESSAGE, $lang['No_send_account_inactive']);
}
!
! $username = $row['username'];
!
$user_actkey = generate_activation_key();
$user_password = generate_password();
|