SMF 1.1.19 para SMF 1.1.20

Iniciado por candidosa2, 04 de Outubro de 2014, 09:27

Tópico anterior - Tópico seguinte

0 Membros e 1 Visitante estão a ver este tópico.

candidosa2

Leia-me

Este ficheiro patch irá corrigir vários problemas de segurança para o seu fórum SMF 1.1.19.

./index.php


* Software Version:           SMF 1.1.19                                          *



* Software Version:           SMF 1.1.20                                          *




$forum_version = 'SMF 1.1.19';



$forum_version = 'SMF 1.1.20';



./Sources/PackageGet.php


* Software Version:           SMF 1.1.12                                          *



* Software Version:           SMF 1.1.20                                          *



$package['href'] = $url . '/' . $package['filename'];
$package['name'] = htmlspecialchars($package['name']);


substituir por

$package['href'] = $url . '/' . $package['filename'];



./Sources/Subs-Package.php


* Software Version:           SMF 1.1.12                                           *



* Software Version:           SMF 1.1.20                                          *



// Ignore errors with borked installed.list's.
list ($name, $file, $id, $version) = array_pad(explode('|^|', $installed_mods[$i]), 4, '');



// Ignore errors with borked installed.list's.
$info = array_pad(explode('|^|', $installed_mods[$i]), 4, '');

list ($name, $file, $id, $version) = htmlspecialchars__recursive($info);



$data .= trim($packageInfo['name']) . '|^|' . trim($packageInfo['filename']) . '|^|' . trim($packageInfo['id']) . '|^|' . trim($packageInfo['version']) . "\n";



$keys = array('name', 'filename', 'id', 'version');
foreach($keys as $key)
{
// Yay for variable variables...
${"package_$key"} = trim(un_htmlspecialchars($packageInfo[$key]));
}
$data .= $package_name . '|^|' . $package_filename . '|^|' . $package_id . '|^|' . $package_version . "\n";



$package = $packageInfo->to_array();
$package['xml'] = $packageInfo;
$package['filename'] = $gzfilename;



$package = $packageInfo->to_array();
$package = htmlspecialchars__recursive($package);
$package['xml'] = $packageInfo;
$package['filename'] = $gzfilename;

// Don't want to mess with code...
$types = array('install', 'uninstall', 'upgrade');
foreach($types as $type)
{
if (isset($package[$type]['code']))
{
$package[$type]['code'] = un_htmlspecialchars($package[$type]['code']);
}
}



./Sources/Packages.php


* Software Version:           SMF 1.1.16                                          *



* Software Version:           SMF 1.1.20                                          *



if (!empty($action['parse_bbc']))
$context['package_readme'] = parse_bbc($context['package_readme']);



if (!empty($action['parse_bbc']))
{
$context['package_readme'] = preg_replace('~\[[/]?html\]~i', '', $context['package_readme']);
$context['package_readme'] = parse_bbc($context['package_readme']);
}




./Sources/Post.php


* Software Version:           SMF 1.1.11                                          *



* Software Version:           SMF 1.1.20                                          *



if (isset($_REQUEST['preview']))
return Post();



if (isset($_REQUEST['preview']))
{
checkSession();
return Post();
}




./Sources/Subs-Auth.php


* Software Version:           SMF 1.1.19                                          *



* Software Version:           SMF 1.1.20                                          *



global $txt, $mtitle, $mmessage, $context;



global $txt, $mtitle, $mmessage, $context, $func;



$context['title'] = &$mtitle;



$context['title'] = $func['htmlspecialchars']($mtitle);