Autor Tópico: SMF 1.1.18 para SMF 1.1.19  (Lida 5823 vezes)

0 Membros e 3 Visitantes estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
SMF 1.1.18 para SMF 1.1.19
« em: 04 de Maio de 2014, 21:10 »
Este ficheiro de correcção irá actualizar seu fórum para SMF 1.1.19.
[/b][/size]

Editar ficheiro

./index.php

Localizar:

Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.18 *

Substituir por

Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.19 *



Código: [Seleccione]
$forum_version = 'SMF 1.1.18';

Código: [Seleccione]
$forum_version = 'SMF 1.1.19';

Código: [Seleccione]
// Register an error handler.

Código: [Seleccione]
// Emit some headers for some modicum of protection against nasties.
if (!headers_sent())
{
// Future versions will make some of this configurable. This is primarily a 'safe' configuration for most cases for now.
header('X-Frame-Options: SAMEORIGIN');
header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff');
}

// Register an error handler.


./Sources/Profile.php

Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.11 *

Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.19 *


Código: [Seleccione]
// Now try to find an infection.
while (!feof($fp))
{
if (preg_match('~(iframe|\\<\\?php|\\<\\?[\s=]|\\<%[\s=]|html|eval|body|script\W)~', fgets($fp, 4096)) === 1)
{
if (file_exists($uploadDir . '/avatar_tmp_' . $memID))
@unlink($uploadDir . '/avatar_tmp_' . $memID);

fatal_lang_error('smf124');
}
}
fclose($fp);



   
Código: [Seleccione]
// Now try to find an infection.
$prev_chunk = '';
while (!feof($fp))
{
$cur_chunk = fread($fp, 8192);

// Paranoid check. Some like it that way.
if (preg_match('~(iframe|\\<\\?|\\<%|html|eval|body|script\W|[CF]WS[\x01-\x0C])~i', $prev_chunk . $cur_chunk) === 1)
{
fclose($fp);
if (file_exists($uploadDir . '/avatar_tmp_' . $memID))
@unlink($uploadDir . '/avatar_tmp_' . $memID);

fatal_lang_error('smf124');
}

$prev_chunk = $cur_chunk;
}
fclose($fp);



   
Código: [Seleccione]
$_POST['realName'] = trim(preg_replace('~[\s]~' . ($context['utf8'] ? 'u' : ''), ' ', $_POST['realName']));

   
Código: [Seleccione]
$_POST['realName'] = trim(preg_replace('~[\t\n\r \x0B\0' . ($context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}\x{AD}\x{2000}-\x{200F}\x{201F}\x{202F}\x{3000}\x{FEFF}' : "\xC2\xA0\xC2\xAD\xE2\x80\x80-\xE2\x80\x8F\xE2\x80\x9F\xE2\x80\xAF\xE2\x80\x9F\xE3\x80\x80\xEF\xBB\xBF") : '\x00-\x08\x0B\x0C\x0E-\x19\xA0') . ']+~' . ($context['utf8'] ? 'u' : ''), ' ', $_POST['realName']));



./Sources/LogInOut.php


Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.6 *


Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.19 *


   
Código: [Seleccione]
// Empty the cookie! (set it in the past, and for ID_MEMBER = 0)
setLoginCookie(-3600, 0);


   
Código: [Seleccione]
// Empty the cookie! (set it in the past, and for ID_MEMBER = 0)
setLoginCookie(-3600, 0);
session_destroy();
if (!empty($ID_MEMBER))
updateMemberData($ID_MEMBER, array('passwordSalt' => '\'' . substr(md5(mt_rand()), 0, 4) . '\''));



./Sources/Register.php


Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.18 *

Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.19 *


   
Código: [Seleccione]
'signature', 'personalText', 'avatar',

   
Código: [Seleccione]
'personalText', 'avatar',

   
Código: [Seleccione]
$_POST['realName'] = trim(preg_replace('~[\s]~' . ($context['utf8'] ? 'u' : ''), ' ', $_POST['realName']));

   
Código: [Seleccione]
$_POST['realName'] = trim(preg_replace('~[\t\n\r \x0B\0' . ($context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}\x{AD}\x{2000}-\x{200F}\x{201F}\x{202F}\x{3000}\x{FEFF}' : "\xC2\xA0\xC2\xAD\xE2\x80\x80-\xE2\x80\x8F\xE2\x80\x9F\xE2\x80\xAF\xE2\x80\x9F\xE3\x80\x80\xEF\xBB\xBF") : '\x00-\x08\x0B\x0C\x0E-\x19\xA0') . ']+~' . ($context['utf8'] ? 'u' : ''), ' ', $_POST['realName']));



./Sources/Subs-Members.php



Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.15 *


Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.19 *


   
Código: [Seleccione]
$regOptions['username'] = preg_replace('~[\t\n\r\x0B\0' . ($context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}' : pack('C*', 0xC2, 0xA0)) : '\xA0') . ']+~' . ($context['utf8'] ? 'u' : ''), ' ', $regOptions['username']);


   
Código: [Seleccione]
$regOptions['username'] = trim(preg_replace('~[\t\n\r \x0B\0' . ($context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}\x{AD}\x{2000}-\x{200F}\x{201F}\x{202F}\x{3000}\x{FEFF}' : "\xC2\xA0\xC2\xAD\xE2\x80\x80-\xE2\x80\x8F\xE2\x80\x9F\xE2\x80\xAF\xE2\x80\x9F\xE3\x80\x80\xEF\xBB\xBF") : '\x00-\x08\x0B\x0C\x0E-\x19\xA0') . ']+~' . ($context['utf8'] ? 'u' : ''), ' ', $regOptions['username']));




./Sources/Subs-Auth.php


Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.11 *


Código: [Seleccione]
* =============================================================================== *
* Software Version: SMF 1.1.19 *



   
Código: [Seleccione]
$user = trim($username);


   
Código: [Seleccione]
$user = trim(preg_replace('~[\t\n\r \x0B\0' . ($context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}\x{AD}\x{2000}-\x{200F}\x{201F}\x{202F}\x{3000}\x{FEFF}' : "\xC2\xA0\xC2\xAD\xE2\x80\x80-\xE2\x80\x8F\xE2\x80\x9F\xE2\x80\xAF\xE2\x80\x9F\xE3\x80\x80\xEF\xBB\xBF") : '\x00-\x08\x0B\x0C\x0E-\x19\xA0') . ']+~' . ($context['utf8'] ? 'u' : ''), ' ', $username));