خ ــادم الإسلام الثلاثاء 4 يناير - 11:12
بسم الله الرحمن الرحيم
تم اكتشاف ثغره جديد في منتديات vb الجيل الثالث من قبل الاخ عندلوالثغره موجوده في
ملف init.php وتحديداً في سطر 542 وهي ثغرة SQL Injection
ويتم نجاح هذه الثغره إذا كانت خاصية magic_quotes_gpc معطله OFF داخل الـ PHP .
التـــرقـــيـــع :توجد طريقتين
الأولى :
إضافة السطر التالي في ملف .htaccess
php_value magic_quotes_gpc 1
الثاني/ بتعديل ملف init.php .قم بالبحث عن
- الكود:
$datastoretemp = $DB_site->query("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('" . implode("', '", $specialtemplates) . "')
");
unset($specials, $specialtemplates);
واستبداله بالتالي
- الكود:
if(!is_array($specialtemplates))
exit;
$specialtemplate = array();
foreach ($specialtemplates AS $arrykey => $arryval)
{
$specialtemplate[] = addslashes($specialtemplates["$arrykey"]);
}
$datastoretemp = $DB_site->query("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('" . implode("', '", $specialtemplate) . "')
");
unset($specials, $specialtemplates, $specialtemplate);