September 25, 2021, 08:27:37 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


This patch file will update your forum to SMF 1.1.17.

File Edits ALT + Click to collapse all the operations

./index.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.16 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.17 *
Find: Select
$forum_version = 'SMF 1.1.16';
Replace With: Select
$forum_version = 'SMF 1.1.17';

./SSI.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.17 *
Find: Select
function ssi_boardNews($board = null, $limit = null, $start = null, $length = null, $output_method = 'echo')
{
global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context;
Replace With: Select
function ssi_boardNews($board = null, $limit = null, $start = null, $length = null, $output_method = 'echo')
{
global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context, $user_info;
Find: Select
SELECT ID_FIRST_MSG
FROM {$db_prefix}topics
WHERE ID_BOARD = $board
ORDER BY ID_FIRST_MSG DESC
Replace With: Select
SELECT t.ID_FIRST_MSG
FROM {$db_prefix}topics as t
LEFT JOIN {$db_prefix}boards as b ON (b.ID_BOARD = t.ID_BOARD)
WHERE t.ID_BOARD = $board
AND $user_info[query_see_board]
ORDER BY t.ID_FIRST_MSG DESC

./Sources/Security.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.9 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.17 *
Find: Select
if ($good_password || $_POST['admin_hash_pass'] == sha1($user_info['passwd'] . $sc))
{
$_SESSION['admin_time'] = time();
return;
}
Replace With: Select
if ($good_password || $_POST['admin_hash_pass'] == sha1($user_info['passwd'] . $sc))
{
$_SESSION['admin_time'] = time();
unset($_SESSION['request_referer']);
return;
}
Find: Select
if ($good_password || sha1(strtolower($user_info['username']) . $_POST['admin_pass']) == $user_info['passwd'])
{
$_SESSION['admin_time'] = time();
return;
}
}
Replace With: Select
if ($good_password || sha1(strtolower($user_info['username']) . $_POST['admin_pass']) == $user_info['passwd'])
{
$_SESSION['admin_time'] = time();
unset($_SESSION['request_referer']);
return;
}
}

// Better be sure to remember the real referer
if (empty($_SESSION['request_referer']))
$_SESSION['request_referer'] = isset($_SERVER['HTTP_REFERER']) ? @parse_url($_SERVER['HTTP_REFERER']) : array();
elseif (empty($_POST))
unset($_SESSION['request_referer']);
Find: Select
$referrer = isset($_SERVER['HTTP_REFERER']) ? @parse_url($_SERVER['HTTP_REFERER']) : array();
Replace With: Select
if (isset($_SESSION['request_referer']))
$referrer = $_SESSION['request_referer'];
else
$referrer = isset($_SERVER['HTTP_REFERER']) ? @parse_url($_SERVER['HTTP_REFERER']) : array();
Advertisement: