A few but most are bug fixes that were left out, replacing the file is a temporary solution until i double check that particular Nuke version to see what conflicts occured.
A few but most are bug fixes that were left out, replacing the file is a temporary solution until i double check that particular Nuke version to see what conflicts occured.
Please let us know when your new patch will be available.
Thanks.
I think I have the solution to this problem (discovered whilst testing the 3.4 patches for PHP-Nuke 8.0, but I assume it is the same problem in 8.1)
In mainfile.php around line 221 we have a whole bunch of variables selected from the nuke_config table, but which are processed by the filter() function. For example
Code:
$sitename = filter($row['sitename'], "nohtml");
The filter() function passes (eventually) its parameters to the check_words() function via
Code:
$what = check_words($what);
Inside the check_words() function, a series of conditions are applied as follows:
Code:
if ($CensorMode == 1) {
and
Code:
if ($CensorMode == 2) {
and
Code:
if ($CensorMode == 3) {
where $EditedMessage is set.
The check_words() function finally returns $EditedMessage.
However, if we go back to line 221 where the filter functon was originally called, we can see that $CensorMode is not set until line 260 via
Code:
$CensorMode = intval($row['CensorMode']);
So, when the filter() function was first called, $CensorMode hadnt been set and was effectively NULL and none of those conditionals in the check_words() function caters for that possibility. So EditedMessage is not set and remains NULL so the check_words() function returns NULL for all calls to the filter() function from line 221 to 260.
SOLUTION
Move the setting of $CensorMode from line 260 to before the first call to the filter() function as follows: (around line 221)
Now $CensorMode is set before the call to the filter() function and the subsequent call to the check_words() function has $CensorMode set and returns an actual value for $EditedMessage.
Tested and working on PHP-Nuke 8.0 with the 3.4 patches
One final note. This was tested on a server with php5.x installed. Maybe this is a problem with php5.x specifically because this doesnt seem to affect servers with php4.x installed (I checked)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum