ترقيع ثغره 3.8.7 - ترقيع ثغره النسخة 3.8.7 - ترقيع ثغرة Vb 3.8.7

DeleGnT

Delegnt.net Moderator
تترقيع ثغره 3.8.7 - ترقيع ثغره النسخة 3.8.7 - ترقيع ثغرة Vb 3.8.7
copym.gif


الحمد لله الذي أنزل القرآن ورفع به الإنسان..

وجعله نورٌ للقلوب و الأبدان
..

و كرم أهله بالفوز بالدنيا و يوم يحشر الثقلان
..

و بشر حامليه و حفظته بالمغفرة و الرضوان
..

و الفلاح و الفوز بالجنان
..

ثم الصلاة و السلام على النبي الهادي العدنان
..

محمد بن عبدالله وآله وصحبه ومن سار على نهجه بإحسان
..

اليوم تخفق مشاعرنا بالبشر والأنس
..

اليوم مجدُ وعُز موصول بالأمس
..

13790925.gif


جميعنا يعرف ان شركه VBulletin هي الرائده في مجال المنتديات

ولكن كما نعلم أيضاً وإن لم تكن تعلم فأعلم الآن بأن عيبها الوحيد هو كثره الثغرات التى تكتشف من حين الى آخر

قد يسأل البعض : لم علي أن أتبع ثغرات المنتدى فجوابي لهم : حتى لا يتم إختراق موقعكـ خلال ثوان

ومن هذة النقطة خطرت لى هذه الفكره وهى البحث عن جميع الثغرات المعروفه و جمعها في هذا الركن

حتى تصبح مرجع لكل من يبحث عن حماية حقيقية للموقع

28436637.gif


صدور ترقيع في الموقع الرسمي على الرابط ..

https://www.vbulletin.com/forum/sho...nd-vB-3.8.7-Low-Risk-quot-phishing-quot-patch

يفضل للمرخصين تحميلها من الشركة والترقية عليها ..

ولمن لايملك الترخيص علية تطبيق الدرس ..

ملحوظة :
الاصدارات السابقة مثل 3.8.6 وما قبلها ما يحتاج تتطبق هذه الطريقة

68914505.gif


دعوة صالحة في ظهر الغيب

زيارة ركن الحماية والثغرات بإستمرار لمتابعة حل مشاكل الثغرات الحديثة بالضغط هنا

36303376.gif


يتم حل هذه الثغره بفتح ملف class_core.php
PHP:
// #############################################################################
/**
* Removes the full path from being disclosed on any errors
*
* @param    integer    Error number
* @param    string    PHP error text string
* @param    strig    File that contained the error
* @param    integer    Line in the file that contained the error
*/
function vb_error_handler($errno, $errstr, $errfile, $errline)
{
    global $vbulletin;

    switch ($errno)
    {
        case E_WARNING:
        case E_USER_WARNING:
            /* Don't log warnings due to to the false bug reports about valid warnings that we suppress, but still appear in the log
            require_once(DIR . '/includes/functions_log_error.php');
            $message = "Warning: $errstr in $errfile on line $errline";
            log_vbulletin_error($message, 'php');
            */

            if (!error_reporting() OR !ini_get('display_errors'))
            {
                return;
            }
            $errfile = str_replace(DIR, '[path]', $errfile);
            $errstr = str_replace(DIR, '[path]', $errstr);
            echo "<br /><strong>Warning</strong>: $errstr in <strong>$errfile</strong> on line <strong>$errline</strong><br />";
        break;

        case E_USER_ERROR:
            require_once(DIR . '/includes/functions_log_error.php');
            $message = "Fatal error: $errstr in $errfile on line $errline";
            log_vbulletin_error($message, 'php');

            if (!headers_sent())
            {
                if (SAPI_NAME == 'cgi' OR SAPI_NAME == 'cgi-fcgi')
                {
                    header('Status: 500 Internal Server Error');
                }
                else
                {
                    header('HTTP/1.1 500 Internal Server Error');
                }
            }

            if (error_reporting() OR ini_get('display_errors'))
            {
                $errfile = str_replace(DIR, '[path]', $errfile);
                $errstr = str_replace(DIR, '[path]', $errstr);
                echo "<br /><strong>Fatal error:</strong> $errstr in <strong>$errfile</strong> on line <strong>$errline</strong><br />";
                if (function_exists('debug_print_backtrace') AND ($vbulletin->userinfo['usergroupid'] == 6 OR ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions)))
                {
                    // This is needed so IE doesn't show the pretty error messages
                    echo str_repeat(' ', 512);
                    debug_print_backtrace();
                }
            }
            exit;
        break;
    }
}

إستبدلة بالتالي ..


PHP:
// #############################################################################
/**
* Unicode-safe version of htmlspecialchars()
*
* @param    string    Text to be made html-safe
*
* @return    string
*/
function htmlspecialchars_uni($text, $entities = true)
{
    return str_replace(
        // replace special html characters
        array('<', '>', '"'),
        array('&lt;', '&gt;', '&quot;'),
        preg_replace(
            // translates all non-unicode entities
            '/&(?!' . ($entities ? '#[0-9]+|shy' : '(#[0-9]+|[a-z]+)') . ';)/si',
            '&amp;',
            $text
        )
    );
}
قم بفتح الملف functions.php وابحث بداخله عن :
PHP:
  if ($vbulletin->options['useheaderredirect'] AND !$forceredirect AND !headers_sent() AND !$vbulletin->GPC['postvars'])
    {
        exec_header_redirect($vbulletin->url);
    }

    $title = $vbulletin->options['bbtitle'];

    $pagetitle = $title;
    $errormessage = $message;

    $url = unhtmlspecialchars($vbulletin->url);
    $url = str_replace(chr(0), '', $url);
    $url = create_full_url($url);
    $url = str_replace($str_find, $str_replace, $url);
    $js_url = addslashes_js($url, '"'); // " has been replaced by &quot;

    $url = preg_replace(
        array('/&#0*59;?/', '/&#x0*3B;?/i', '#;#'),
        '%3B',
        $url
    );
    $url = preg_replace('#&amp%3B#i', '&amp;', $url);

    define('NOPMPOPUP', 1); // No footer here

    require_once(DIR . '/includes/functions_misc.php');
    $postvars = construct_hidden_var_fields(verify_client_string($vbulletin->GPC['postvars']));
    $formfile =& $url;

    ($hook = vBulletinHook::fetch_hook('redirect_generic')) ? eval($hook) : false;

    eval('print_output("' . fetch_template('STANDARD_REDIRECT') . '");');
    exit;
}
إستبدلة بالتالي ..

PHP:
  if ($vbulletin->url)
    {
        $foundurl = false;
        if ($urlinfo = @parse_url($vbulletin->url))
        {
            if (!$urlinfo['scheme'])
            {    // url is made full in exec_header_redirect which stops a url from being redirected to, say "www.php.net" (no http://)
                $foundurl = true;
            }
            else
            {
                $whitelist = array();
                if ($vbulletin->options['redirect_whitelist'])
                {
                    $whitelist = explode("\n", trim($vbulletin->options['redirect_whitelist']));
                }
                // Add $bburl to the whitelist
                $bburlinfo = @parse_url($vbulletin->options['bburl']);
                $bburl = "{$bburlinfo['scheme']}://{$bburlinfo['host']}";
                array_unshift($whitelist, $bburl);

                // if the "realurl" of this request does not equal $bburl, add it as well..
                $realurl = VB_URL_SCHEME . '://' . VB_URL_HOST;
                if (strtolower($bburl) != strtolower($realurl))
                {
                    array_unshift($whitelist, $realurl);
                }

                $vburl = strtolower($vbulletin->url);
                foreach ($whitelist AS $url)
                {
                    $url = trim($url);
                    if ($vburl == strtolower($url) OR strpos($vburl, strtolower($url) . '/', 0) === 0)
                    {
                        $foundurl = true;
                        break;
                    }
                }
            }
        }
        
        if (!$foundurl)
        {
            eval(standard_error(fetch_error('invalid_redirect_url_x', $vbulletin->url)));


        }
    }

    if ($vbulletin->options['useheaderredirect'] AND !$forceredirect AND !headers_sent() AND !$vbulletin->GPC['postvars'])
    {
        exec_header_redirect($vbulletin->url);
    }

    $title = $vbulletin->options['bbtitle'];

    $pagetitle = $title;
    $errormessage = $message;

    $url = unhtmlspecialchars($vbulletin->url);
    $url = str_replace(chr(0), '', $url);
    $url = create_full_url($url);
    $url = str_replace($str_find, $str_replace, $url);
    $js_url = addslashes_js($url, '"'); // " has been replaced by &quot;

    $url = preg_replace(
        array('/&#0*59;?/', '/&#x0*3B;?/i', '#;#'),
        '%3B',
        $url
    );
    $url = preg_replace('#&amp%3B#i', '&amp;', $url);

    define('NOPMPOPUP', 1); // No footer here

    require_once(DIR . '/includes/functions_misc.php');
    $postvars = construct_hidden_var_fields(verify_client_string($vbulletin->GPC['postvars']));
    $formfile =& $url;

    ($hook = vBulletinHook::fetch_hook('redirect_generic')) ? eval($hook) : false;

    eval('print_output("' . fetch_template('STANDARD_REDIRECT') . '");');
    exit;
}

:1:

74322355.gif


وها نحن نأتي وإياكم إلى ختام جولتنا المباركة , بين أفياء حديقتنا

وزهرات بساتيننا وشذا زهراتنا الفواحة .

بعد أن طـّوفنا فيها سوياَ فرأينا ما يعجب العين , وسمعنا ما يشنف الآذان ويطرب

الفؤاد، وإنه ليعز علينا الفراق بعد اجتماع والبعد بعد لقاء.

يا من يعـز عـلـيـنـا أن نـفـارقـهـم وجـدانــنـا كل شيء بـعـدكـم عـــدم

ولا يسعنا أحبتنا الكرام في هذا ، إلا أن ندعو الله لنا ولكم التوفيق

الذي جمّع شملنا في معهدنا المبارك

وها هو وقت الوداع حان ..

وزمان البين آن وإلى لقاء قريب وعلى الأبداع نجتمع.


67179642.gif

 


موضوع رائع وجميل ربي يسعدك
وحبذا لو يتم ارفاق الملفات معدله ومرقعه الثغرات
لكي يتم الرفع الاستبدال مباشرة
 
عودة
أعلى