Advertisement:
Advertise With Us!

Navigation

Readme

This patch file will update your forum to SMF 1.0.7.

File Edits

./Sources/QueryString.php

Operation #1
Find: [Select]
* Software Version: SMF 1.0 *
Replace With: [Select]
* Software Version: SMF 1.0.7 *
Operation #2
Find: [Select]
// We actually don't want slashes in $_GET... just entities - which serve the same purpose.
if (get_magic_quotes_gpc() != 0)
$_SERVER['REQUEST_URI'] = stripslashes($_SERVER['REQUEST_URI']);

// Remove the .html, assuming there is one.
Replace With: [Select]
// Remove the .html, assuming there is one.
Operation #3
Find: [Select]
// If magic_quotes_gpc isn't off, remove the slashes from the get variables. (they're gonna be html'd anyway.)
if (get_magic_quotes_gpc() != 0)
$_SERVER['QUERY_STRING'] = stripslashes($_SERVER['QUERY_STRING']);

// Replace ';' with '&' and '&something&' with '&something=&'. (this is done for compatibility...)
Replace With: [Select]
// Replace ';' with '&' and '&something&' with '&something=&'. (this is done for compatibility...)
Operation #4
Find: [Select]
$_SERVER = addslashes__recursive($_SERVER);

// FILES work like this: k -> name -> array. So be careful.
foreach ($_FILES as $k => $dummy)
$_FILES[$k]['name'] = addslashes__recursive($_FILES[$k]['name']);
}
Replace With: [Select]

// FILES work like this: k -> name -> array. So be careful.
foreach ($_FILES as $k => $dummy)
$_FILES[$k]['name'] = addslashes__recursive($_FILES[$k]['name']);
}

// Take care of the server variables.
$_SERVER = addslashes__recursive($_SERVER);

Operation #5
Find: [Select]
if (empty($_SERVER['HTTP_USER_AGENT']))
$_SERVER['HTTP_USER_AGENT'] = '';
Replace With: [Select]
$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? htmlspecialchars(stripslashes($_SERVER['HTTP_USER_AGENT']), ENT_QUOTES) : '';

// Some final checking.
if (preg_match('~^((([1]?\d)?\d|2[0-4]\d|25[0-5])\.){3}(([1]?\d)?\d|2[0-4]\d|25[0-5])$~', $_SERVER['REMOTE_ADDR']) === 0)
$_SERVER['REMOTE_ADDR'] = '';

./changelog.txt

Operation #1
Find: [Select]
SMF 1.0.6 15 January 2006
================================================================================
December 2005:
--------------------------------------------------------------------------------
Add Before: [Select]
SMF 1.0.7 29 March 2006
================================================================================
March 2005:
--------------------------------------------------------------------------------
! Added an extra check on the HTTP_X_FORWARDED_FOR input variable. (QueryString.php)
! Limit the number of words that can be searched for a little bit. (Search.php)
! Prevent users from voting more than once in a poll. (Poll.php)


./index.php

Operation #1
Find: [Select]
* Software Version: SMF 1.0.6 *
Replace With: [Select]
* Software Version: SMF 1.0.7 *
Operation #2
Find: [Select]
$forum_version = 'SMF 1.0.6';
Replace With: [Select]
$forum_version = 'SMF 1.0.7';

./Sources/Search.php

Operation #1
Find: [Select]
* Software Version: SMF 1.0.5 *
Replace With: [Select]
* Software Version: SMF 1.0.7 *
Operation #2
Find: [Select]
$searchArray = array_unique($searchArray);
Replace With: [Select]
$searchArray = array_slice(array_unique($searchArray), 0, 10);

./Sources/Poll.php

Operation #1
Find: [Select]
* Software Version: SMF 1.0.3 *
Replace With: [Select]
* Software Version: SMF 1.0.7 *
Operation #2
Find: [Select]
elseif (!empty($row['changeVote']) && empty($_POST['options']))
Replace With: [Select]
elseif (!empty($row['changeVote']))
Operation #3
Find: [Select]
// Redirect back to the topic so the user can vote again!
redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);
Replace With: [Select]
// Redirect back to the topic so the user can vote again!
if (empty($_POST['options']))
redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);