|
|
|
|
|
|
|
|
|
|
Для исправления уязвимостей Вы можете воспользоваться готовыми файлами. В архиве сохранена структура файлов для простоты использования. Делать это стоит только в том случае, если не было произведено никаких изменений в этих файлах.
Либо воспользоваться инструкциями приведенными ниже.
Internet Explorer может некорректно обрабатывать специально измененные ВВ-коды, которые содержат Javascript. Опасность данной уязвимости не значительна, если Ваши форумы используют httpOnly cookies.
В файле sources\classes\bbcode\class_bbcode_core.php найти:
# Recurse? if ( preg_match( "#\[.+?\]#s", $match[ $_content ][$i] ) ) { $match[ $_content ][$i] = $this->post_db_parse_bbcode( $match[ $_content ][$i] ); }
Добавить после:
$match[ $_content ][$i] = preg_replace( '#(style)=#is', "$1=", $match[ $_content ][$i] ); $match[ $_option ][$i] = preg_replace( '#(style)=#is', "$1=", $match[ $_option ][$i] );
Найти:
//----------------------------------------- // Check... //----------------------------------------- if ( $this->ipsclass->xss_check_url( $url ) !== TRUE ) { return ''; }
Добавить после:
//----------------------------------------- // Don't let emos in URL.. //----------------------------------------- if ( $this->parse_smilies ) { if ( count( $this->ipsclass->cache['emoticons'] ) > 0 ) { foreach( $this->ipsclass->cache['emoticons'] as $row) { $code = $row['typed']; $code = str_replace( '<', '<', str_replace( '>', '>', $code ) ); if( strpos( $url, $code ) ) { $new = ''; for( $i=0; $i<strlen($code); $i++ ) { //print dechex(ord($code{$i})).'<Br>'; $new .= '%' . dechex(ord($code{$i})); } $url = str_replace( $code, $new, $url ); } } } } $url = htmlspecialchars($url);
Найти:
if ( preg_match( "#\[(" . implode( '|', $bbcodes ) . ")(.*?)\]#is", $url['html'] ) ) { $this->error = 'domain_not_allowed'; return $url['html']; } //-----------------------------------------
Добавить после:
// Don't let emos in URL.. //----------------------------------------- if ( $this->parse_smilies ) { if ( count( $this->ipsclass->cache['emoticons'] ) > 0 ) { foreach( $this->ipsclass->cache['emoticons'] as $row) { $code = $row['typed']; $code = str_replace( '<', '<', str_replace( '>', '>', $code ) ); if( strpos( $url['html'], $code ) ) { $new = ''; for( $i=0; $i<strlen($code); $i++ ) { //print dechex(ord($code{$i})).'<Br>'; $new .= '%' . dechex(ord($code{$i})); } $url['html'] = str_replace( $code, $new, $url['html'] ); } } } } //-----------------------------------------
Найти:
{ $url['end'] .= $match[1]; $url['html'] = preg_replace( "/(\+\-\-\>)$/", "", $url['html'] ); $url['show'] = preg_replace( "/(\+\-\-\>)$/", "", $url['show'] ); } //----------------------------------------- // clean up the ampersands / brackets //-----------------------------------------
Добавить после:
$url['html'] = htmlspecialchars( $url['html'] );
Работает на DokuWiki |