Advanced Profile Fields - łatka bezpieczeństwa
Zalecane jest wykonanie instrukcji na forach, gdzie zainstalowane jest APF. Proszę wykonać instrukcję zamieszczoną poniżej
Kod:
##############################################################
## Title: Advanced Profile Fields Bug Patch
## Author: ENC http://www.phpBB2.pl/
## Finder: ENC http://www.phpBB2.pl/
##
## MOD Version: 2.0
## MOD Author: Damianmyst
##
## Files To Edit: 1
## includes/apf.php
##############################################################
## Before Adding This UPDATE To Your Forum, You Should Back Up All Files Related To This UPDATE
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
includes/apf.php
#
#-----[ FIND ]------------------------------------------------
#
function sql_in($gdzie, $subgdzie='')
{
global $_POST;
if ($gdzie == 'edit')
{
$set='';
$set1='';
for($i=0;$i<$this->ile;$i++)
{
$field_a = 'user_field_'.$this->dane['0'][$i];
$field_b = 'pole_'.$this->dane['0'][$i];
$set .= $field_a ." = ". "'".str_replace("\'", "''", addslashes($_POST[$field_b]))."', ";
}
return $set;
}
if ($gdzie == 'register')
{
$set='';
$name='';
for($z=0;$z<$this->ile;$z++)
{
$name.='user_field_'.$this->dane['0'][$z].', ';
$set.='"'.str_replace("\'", "''", addslashes($_POST['pole_'.$this->dane['0'][$z]])).'", ';
}
if ($subgdzie == 'name')
{
return $name;
}
elseif ($subgdzie == 'set')
{
return $set;
}
}
}
#
#-----[ REPLACE WITH ]----------------------------------------
#
function sql_in($gdzie, $subgdzie='')
{
global $_POST;
if ($gdzie == 'edit')
{
$set='';
$set1='';
for($i=0;$i<$this->ile;$i++)
{
$field_a = 'user_field_'.$this->dane['0'][$i];
$field_b = 'pole_'.$this->dane['0'][$i];
$set .= $field_a ." = ". "'".str_replace("\'", "''", htmlspecialchars(addslashes($_POST[$field_b])))."', ";
}
return $set;
}
if ($gdzie == 'register')
{
$set='';
$name='';
for($z=0;$z<$this->ile;$z++)
{
$name.='user_field_'.$this->dane['0'][$z].', ';
$set.='"'.str_replace("\'", "''", htmlspecialchars(addslashes($_POST['pole_'.$this->dane['0'][$z]]))).'", ';
}
if ($subgdzie == 'name')
{
return $name;
}
elseif ($subgdzie == 'set')
{
return $set;
}
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
lub ściągnąć plik
apf.php >> CLICK << i podmienić plik apf.php w katalogu
includes\apf.php na ten ściągnięty.
APF 2.0 - patch | phpBB2 r0x | BeerMod 1.0.0 RC3 | My MODs