Discuz.in.th ดิสคัสอินไทย

 ลืมรหัสผ่าน
 สมัครสมาชิก
ค้นหา
ดู: 811|ตอบกลับ: 0

อาการค้นหาแล้วเจอ PHP Debug Discuz! System Error

[คัดลอกลิงก์]

10

โพสต์

35

โพสต์

55

เครดิต

สมาชิกทั่วไป

เครดิต
55


อาการค้นหาเจอ PHP Debug
[Line: 0022]search.php(discuz_application->init)
[Line: 0071]source\class\discuz\discuz_application.php(discuz_application->_init_misc)
[Line: 0552]source\class\discuz\discuz_application.php(discuz_application->_xss_check)
[Line: 0355]source\class\discuz\discuz_application.php(system_error)
[Line: 0017]source\function\function_core.php(discuz_error::system_error)
[Line: 0024]source\class\discuz\discuz_error.php(discuz_error::debug_backtrace)

เปิดไฟล์ \source\class\discuz\discuz_application.php

ค้นหา

    private function _xss_check() {

        static $check = array('"', '>', '<', '\'', '(', ')', 'CONTENT-TRANSFER-ENCODING');

        if(isset($_GET['formhash']) && $_GET['formhash'] !== formhash()) {
            system_error('request_tainting');
        }

        if($_SERVER['REQUEST_METHOD'] == 'GET' ) {
            $temp = $_SERVER['REQUEST_URI'];
        } elseif(empty ($_GET['formhash'])) {
            $temp = $_SERVER['REQUEST_URI'].http_build_query($_POST);
        } else {
            $temp = '';
        }

        if(!empty($temp)) {
            $temp = strtoupper(urldecode(urldecode($temp)));
            foreach ($check as $str) {
                if(strpos($temp, $str) !== false) {
                    system_error('request_tainting');
                }
            }
        }

        return true;
    }

แทนด้วย

    private function _xss_check() {
                    $temp = strtoupper(urldecode(urldecode($_SERVER['REQUEST_URI'])));
                    if(strpos($temp, '<') !== false || strpos($temp, '"') !== false || strpos($temp, 'CONTENT-TRANSFER-ENCODING') !== false) {
                            system_error('request_tainting');
                    }
                    return true;
            }

อัปเดตแคช

ขออภัย! โพสต์นี้มีไฟล์แนบหรือรูปภาพที่ไม่ได้รับอนุญาตให้คุณเข้าถึง

คุณจำเป็นต้อง เข้าสู่ระบบ เพื่อดาวน์โหลดหรือดูไฟล์แนบนี้ คุณยังไม่มีบัญชีใช่ไหม? สมัครสมาชิก

×
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง เข้าสู่ระบบ | สมัครสมาชิก

รายละเอียดเครดิต

ข้อความล้วน|อุปกรณ์พกพา|ประวัติการแบน|Discuz.in.th ดิสคัสอินไทย |นโยบายคุกกี้

GMT+7, 2024-4-20 15:18 , Processed in 0.148876 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

ตอบโพสต์ ขึ้นไปด้านบน ไปที่หน้ารายการโพสต์