http://www.phpbb.com/news.php?id=23
http://www.phpbb.com/phpBB/viewtopic.php?t=135116
--------------------------------
我大約翻一下...
----------------------
phpBB小組最近發現近來新的phpBB版本有個嚴重的漏洞,
允許bbcode tag(像是)可以使用xss 影響的版本包括2.0.4、2.0.5、2.0.6 如果你 ... .phpbb.com code..
$patterns[] = "#\[url\]([\w]+?://.*?[^ \"
\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// www.phpbb.com code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.([\w\-]+\.)*?[\w\-]+\.[a-z]{2,4}(:?[0-9]*?/[^ \"
\t<]*)?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\+?://.*?[^ \"
\t<]*?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB code.. (no xxxx:// prefix).
$patterns[] = "#\+\.)*?[\w\-]+\.[a-z]{2,4}(:?[0-9]*?/[^ \"
\t<]*)?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];[/code]
--取代為--
代碼: 選擇全部
// matches a [url]xxxx://www.phpbb.com[/url] code..
$patterns[] = "#\[url\]([\w]+?://[^ \"
\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.[^ \"
\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://[^ \"
\t<]*?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[^ \"
\t<]*?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];代碼: 選擇全部
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[
])([\w]+?://.*?[^ \"
\t<]*)#is", "\\\1<a href=\"\\\2\" target=\"_blank\">\\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[
])((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^ \"\t
<]*)?)#is", "\\\1<a href=\"http://\\\2\" target=\"_blank\">\\\2</a>", $ret);代碼: 選擇全部
//matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[
])([\w]+?://[^ \"
\t<]*)#is", "\\\1<a href=\"\\\2\" target=\"_blank\">\\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[
])((www|ftp)\.[^ \"\t
<]*)#is", "\\\1<a href=\"http://\\\2\" target=\"_blank\">\\\2</a>", $ret);有興趣的人自己再去看吧



