SMF 2.0.7 TO 2.0.8 Test failed

Started by pugcab, August 30, 2014, 03:18:19 PM

Previous topic - Next topic

pugcab

When trying to install the update I get 3 test failed all in ./Sources/Subs-Post.php

Quote* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0

--------------------------------------------------------------
Quote
            if (allowedTo('admin_forum'))
               $parts[$i] = preg_replace('~\[html\](.+?)\[/html\]~ise', '\'\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'
\', \'  \' => \'  \', \'[\' => \'[\', \']\' => \']\')) . \'\'', $parts[$i]);

------------------------------------------------------------

Quote
// Now fix possible security problems with images loading links automatically...
   $message = preg_replace_callback('~(\[img.*?\]http://)(.+?)\[/img\]~is', create_function('$m', 'return "$m[1]" . preg_replace("~action(=|%3d)(?!dlattach)~i", "action-", "$m[2]") . "[/img]";'), $message);

the mods I have installed are:

1.   SMFPacks Shoutbox   1.0.5   [ Uninstall ]
2.   SMF 2.0.7 Update   1.0   [ Uninstall ]
3.   Misc Anti Spam   1.0   [ Uninstall ]
4.   SMF 1.1.19 / 2.0.6 Update   1.0   [ Uninstall ]
5.   SMF 2.0.5 Update   1.0   [ Uninstall ]
6.   SMF 2.0.4 Update   1.0   [ Uninstall ]
7.   SMF 2.0.3 Update   1.0   [ Uninstall ]
8.   Add Social Media Icons To Profiles   1.0.6   [ Uninstall ]
9.   Medal Honor For Years   1.0   [ Uninstall ]
10.   Curve_centered_menu   1.4   [ Uninstall ]
11.   Copyright and Footer Links   3.2   [ Uninstall ]
12.   Google Member Map   2.6   [ Uninstall ]
13.   SMF 2.0.2 Update   1.0   [ Uninstall ]
14.   SMF Garage   2.2   [ Uninstall ]
15.   6 Custom buttons / tabs with Sub Menus (4)   0.5   [ Uninstall ]
16.   Adk Snow Effect   1.0   [ Uninstall ]
17.   PM to New Members   1.2   [ Uninstall ]
18.   eBay BBCode   3.0.1   [ Uninstall ]
19.   View Only Boards   1.2c   [ Uninstall ]
20.   Country Flags   1.1.2   [ Uninstall ]
21.   TinyPortal   1.104   [ Uninstall ]

Any advice on the way to solve the problem please

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

pugcab

thank-you for the link...I've changed the 1st 2 , but im  little confused about the last one....

I need to find
Quote// Now fix possible security problems with images loading links automatically...
   $message = preg_replace_callback('~(\[img.*?\]http://)(.+?)\[/img\]~is', create_function('$m', 'return "$m[1]" . preg_replace("~action(=|%3d)(?!dlattach)~i", "action-", "$m[2]") . "[/img]";'), $message);

replace it with
Quote// Now fix possible security problems with images loading links automatically...
   $message = preg_replace_callback('~(\[img.*?\]http://)(.+?)\[/img\]~is', 'action_fix__preg_callback', $message);

What i found was
Quote// Now fix possible security problems with images loading links automatically...
   //$message = preg_replace('~(\[img.*?\])(.+?)\[/img\]~eis', '\'$1\' . preg_replace(\'~action(=|%3d)(?!dlattach)~i\', \'action-\', \'$2\') . \'[/img]\'', $message);
    $message = preg_replace('~(\[img.*?\]http://)(.+?)\[/img\]~eis', '\'$1\' . preg_replace(\'~action(=|%3d)(?!dlattach)(?!garage)~i\', \'action-\', \'$2\') . \'[/img]\'', $message);

Anyone know if its save to replace this ?

Chalky

It looks like that code has already been modified by the SMF Garage mod, so if you just directly replace you will break that mod.  You will need to compare exactly what changes that mod made to the original code so that you can add the 2.0.8 bits carefully around it.  Alternatively, uninstall the Garage mod first, check that uninstalling has reverted the code to the original, apply the 2.0.8 update and reinstall the mod.  I tried to check the SMF Garage code for you but I can't find it on the mod site.

Kindred

it actually looks like your 2.0.7 update was never fully applied because of that mod as well...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: