Thứ Ba, 11 tháng 6, 2013

Tutorial: Fix bug SQL Injection Music Gift for vBB

Vào AdminCP > Plugins & Products > Plugin Manager, sau đó kéo xuống và tìm đến Plugin của mod Music Gift.


Sửa plugin có hook là ajax_start, thêm vào đoạn đầu phần Plugin PHP Code hàm sau (hàm này có tác dụng lọc input của câu lệnh SQL):

function anti_sql($sql) {
$sql = str_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|*|--|\)/"),"",$sql);
return trim(strip_tags(addslashes($sql))); #strtolower()
}


READ MORE »

Không có nhận xét nào:

Đăng nhận xét