- 1 Ağu 2007
- 5,470
- 41
Aşağıdaki güvenlik riski MKPortal coderı meo tarafından bulunmuş ve yamanmıştır.
Ayrıca yine gallery modülünde bir risk vardır. Bunlar sadece riskli kodların engellenmesi için. Siz yinede yapın.
/mkportal/modules/blog/index.php dosyasını açın
function clean_template fonksiyonunu bulun:
Bununla değişin
Aşağıdaki dosyayı açın:
/mkportal/modules/gallery/index.php
Bul:
Bu Güvenlik Yaması M1.0 & M1.1 Kullananların Yapması Gerekmektedir.
Ayrıca yine gallery modülünde bir risk vardır. Bunlar sadece riskli kodların engellenmesi için. Siz yinede yapın.
/mkportal/modules/blog/index.php dosyasını açın
function clean_template fonksiyonunu bulun:
function clean_template ($t="") {
$t = str_replace( "&#" , "", $t );
$t = str_replace( ">" , ">", $t );
$t = str_replace( "<" , "<", $t );
$t = str_replace( "<?" , "" , $t );
$t = str_replace( "?" , "" , $t );
$t = preg_replace( "/<script/i" , "" , $t );
$t = preg_replace( "/javascript/i" , "", $t );
$t = preg_replace( "/about/i" , "", $t );
$t = preg_replace( "/vbscript/i" , "", $t );
$t = preg_replace( "/alert/i" , "" , $t );
$t = preg_replace( "/onmouseover/i", "", $t );
$t = preg_replace( "/onclick/i" , "" , $t );
$t = preg_replace( "/onload/i" , "" , $t );
$t = preg_replace( "/onsubmit/i" , "" , $t );
return $t;
}
Bununla değişin
function clean_template ($t="") {
Kaydedin$t = str_replace( "&#" , "", $t );
$t = str_replace( ">" , ">", $t );
$t = str_replace( "<" , "<", $t );
$t = str_replace( "<?" , "" , $t );
$t = str_replace( "?" , "" , $t );
while( preg_match( "#script(.+?)/script#ies" , $t ) ) {
$t = preg_replace( "#script(.+?)/script#ies", "" , $t);
}
$t = preg_replace( "/javascript/i" , "", $t );
$t = preg_replace( "/about/i" , "", $t );
$t = preg_replace( "/vbscript/i" , "", $t );
$t = preg_replace( "/alert/i" , "" , $t );
$t = preg_replace( "/onmouseover/i", "", $t );
$t = preg_replace( "/onclick/i" , "" , $t );
$t = preg_replace( "/onload/i" , "" , $t );
$t = preg_replace( "/onsubmit/i" , "" , $t );
return $t;
}
Aşağıdaki dosyayı açın:
/mkportal/modules/gallery/index.php
Bul:
$file = $_FILES['FILE_UPLOAD']['tmp_name'];
Altına ekle:$file_name = $_FILES['FILE_UPLOAD']['name'];
$file_type = $_FILES['FILE_UPLOAD']['type'];
$peso = $_FILES['FILE_UPLOAD']['size'];
}
$check = @fopen($file, "r");
Kaydedin:$check = @fread($check, filesize($file));
if (preg_match("/html/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/javascript/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/about/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/vbscript/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/alert/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onmouseover/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onclick/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onload/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/onsubmit/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("#script(.+?)/script#ies", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
if (preg_match("/<?php/i", $check)) {
$message = "Sorry this file is not valid";
$mklib->error_page($message);
exit;
}
@fclose($check);
Bu Güvenlik Yaması M1.0 & M1.1 Kullananların Yapması Gerekmektedir.