Neue Downloads
Top 5 Downloads
 | Unterstützt BS-Fusion |
| Spendenmöglichkeiten |
Handy:
|
Telefon:
|
OnlineBanking:
|
|
|
Durchsuche Thema 
|
| Autor |
CSRF Exploit in der ubbparser.class.php gefunden 08.07.2010 21:47 |
#1
 |
|
Silvermoon Webmaster


Beiträge: 693
Ort: 72270 Baiersbronn
Eingetreten: 26.06.06 Status: Offline
|
Hallo BS-Fusion- und Extboard User,
in der ubbparser.class.php hat sich ein CSRF Exploit eingeschlichen, welcher umgehend gefixt werden sollte.
öffnen der ubbparser.class.php im includes Verzeichnis und nach "function ubb_img" suchen.
Den kompletten Code mit dem nachstehenden Code ersetzen:
| Code PHP |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61 |
function ubb_img($arguments) {
global $cache_img;
if (!isset($cache_img)) $cache_img=array();
if(isset($arguments['w']) && is_numeric($arguments['w'])){
if((int) $arguments['w']){ // Int to eliminate scripting
$awidth = 'width="'.((int)$arguments['w']).'" ';
}else{
$awidth = '';
}
} else {
$awidth = '';
}
if(isset($arguments['h']) && is_numeric($arguments['h'])){
if((int) $arguments['h']){ // Int to eliminate scripting
$aheight = 'height="'.((int)$arguments['h']).'" ';
}else{
$aheight = '';
}
} else {
$aheight = '';
}
if(isset($arguments['alt']) && preg_match("/^[0-9A-Za-z-_\.\s]{3,100}+$/i",$arguments['alt'])){
$alttext = ' alt="'.($arguments['alt']).'" title="'.($arguments['alt']).'"';
} else {
$alttext = ' alt="" title=""';
}
$maxwidth = 468;
$maxheight = 400;
$content = $this->parseArray(array('[/img]'), array());
if (!preg_match("#((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))#i",$content)) {$content="";
return false;}
else {
$name = md5($content);
@ini_set('allow_url_fopen', 1);
if (!isset($cache_img[$name])) {
$data = @getimagesize($content);
if($data!==false) {
$width = $data[0];
$height = $data[1];
if ($awidth!="" && $arguments['w']<$width) $width=$arguments['w'];
if ($aheight!="" && $arguments['h']<$height) $height=$arguments['h'];
$minwidth = $maxwidth;
$newteiler = $width/$maxwidth;
$minheight = $height/$newteiler;
if($width <= $maxwidth && $height<=$maxheight) {
$text = '<img src="'.$content.'" height="'.$height.'" width="'.$width.'" style="border:0px"'.$alttext.' rel="nofollow">';
} else {
$text = '<div><a id="thumb1" href="'.$content.'" title="Click for fullsize" class="highslide" onclick="return hs.expand(this)" rel="nofollow"><img src="'.$content.'" style="border:0px; width:'.$minwidth.'px;height:'.$minheight.'px;"'.$alttext.'></a></div>';
}
} else {
$text = '<img name="'.$name.'" src="'.htmlentities(strip_tags($content)).'" style="border:0px; max-width:468px;max-height:400px;" rel="nofollow">';
}
$cache_img[$name]=$text;
} else {
$text=$cache_img[$name];
}
return $text;
}
} |
|
Im Downloadpaket ist dieser Bug gefixt
Es ist alles eine Frage der Überarbeitung
BS-FUSION - KEEP IT SIMPLE
Content Management System Support |
|
Springe zu Forum:
|
| Ähnliche Themen wie "CSRF Exploit in der ubbparser.class.php gefunden" [3] | |
|