MyBB 1.1.1 Released
#5
If you applied this patch before 3:20am Saturday 15 April (GMT), there have been a few small issues reported regarding this patch and functionality.

- [img] tags may no longer work correctly
- [img=wxh] tags my no longer work correctly
- "Allow [img] Code" setting no longer works for MyCode
- Thruth tricky URL modification it is possible to change the $_SERVER variable thus making one of the patches we had in place useless.

Thanks to both DCoder and once again our friend imei for making me aware of this.

To fix this yourselves you can either download the patched files attached below or make the following changes yourself:

global.php

Find:
if(strpos(strtolower($_SERVER['PHP_SELF']), "global.php") !== false)
{
	die("Direct initialization of this file is not allowed.");
}
MOVE it to ABOVE:
// This is a temporary patch put in place until 1.2 is released.
inc/functions_post.php:

Find:
	if($allowimgcode)
	{
		$message = preg_replace("#\[img\](https?://([^<>\"']+))\[/img\]#i", "<img src=\"$1\" border=\"0\" alt=\"\" />", $message);
		$message = preg_replace("#\[img=([0-9]{1,3})x([0-9]{1,3})\](https?://([^<>\"']+))\[/img\]#i", "<img src=\"$3\" style=\"border: 0; width: $1px; height: $2px;\" alt=\"\" />", $message);
	}
REPLACE it with:
	if($allowimgcode != "no")
	{
		$message = preg_replace("#\[img\](https?://([^<>\"']+?))\[/img\]#i", "<img src=\"$1\" border=\"0\" alt=\"\" />", $message);
		$message = preg_replace("#\[img=([0-9]{1,3})x([0-9]{1,3})\](https?://([^<>\"']+?))\[/img\]#i", "<img src=\"$3\" style=\"border: 0; width: $1px; height: $2px;\" alt=\"\" />", $message);
	}
The download on the MyBB site has also been updated.


Attached Files
.php   global.php (Size: 10.52 KB / Downloads: 1,006)
.php   functions_post.php (Size: 23.7 KB / Downloads: 1,008)


Messages In This Thread
MyBB 1.1.1 Released - by - 2006-04-14, 01:29 AM
RE: MyBB 1.1.1 Released - by - 2006-04-14, 01:30 AM
RE: MyBB 1.1.1 Released - by - 2006-04-14, 01:39 AM
RE: MyBB 1.1.1 Released - by - 2006-04-14, 03:19 AM
RE: MyBB 1.1.1 Released - by - 2006-04-15, 03:59 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)