New articles Năng lực quản lý: nhân tố thứ năm     ♥ Lựa chọn mục tiêu cuộc đời     ♥ 10 bí quyết cân bằng công việc và gia đình     ♥ Cô đơn trên mạng     ♥ Chứng khoán: Giấc mơ và ác mộng     ♥ Tám     ♥ Những tính năng của blog VnVista     ♥ Các mạng xã hội thống trị Google     ♥ Điều gì tạo nên một giám đốc công nghệ thông tin giỏi?     ♥ Cố gắng xóa bỏ những ấn tượng xấu     ♥ Cần một cách làm ăn mới     ♥ Tiếp thị hướng đến doanh nhân     ♥ Đưa cửa hàng thật lên chợ ảo     ♥ Bí quyết quản lý các nhân viên trẻ     ♥ Một số câu hỏi phỏng vấn “đặc biệt” của Microsoft     ♥ 4 bài học thành công trong kinh doanh     ♥ Tạo dựng hình ảnh một cô gái trẻ chuyên nghiệp     ♥ Góc “khác” của thế giới online đêm     ♥ Phong cách người Mỹ     ♥ Chỉ nghĩ đến tiền cũng làm người ta ích kỷ     
New blog entries Các loại visa Qatar phổ biến mà bạn cần biết      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ SHEET Nếu đời không có anh      ♥ Phụ Gia Nhựa Làm Giảm Co Ngót Sau Gia Công Ép Phun      ♥ Địa chỉ mua giày bảo hộ nam chính hãng      ♥ SHEET Giây phút êm đềm      ♥ Máy Triệt Lông Công Nghệ Cao K18A      ♥ Cách chọn giày bảo hộ tại Đà Nẵng      ♥ hình ảnh Yae Miko Game Genshin Impact      ♥ Cách bảo quản và vệ sinh giày bảo hộ lao động      ♥ SHEET Yêu 1 người sao buồn đến thế      ♥ Bí quyết bảo quản giày bảo hộ lao động      ♥ Máy Triệt Lông Lạnh Diode Laser K17      ♥ Công Nghệ Đùn Ống Nhựa Với Hạt Nhựa Nguyên Sinh      ♥ SHEET Xin cho 1 tiếng kinh cầu      ♥ máy nâng cơ xóa nhăn      ♥ Top 5 dầu gội thảo dược Việt nam 2025      ♥ Nhà phân phối giày bảo hộ tại Đà Nẵng uy tín      

[ Liệt Kê ] · Bình Thường · Tách Biệt+

Security Update Edits, IPB 2.0.4 to IPB 2.1.4


mamen
post Jan 21 2006, 03:53 AM
Gửi vào: #1
No avartar

Group Icon

Thực tập viên
*
Thành viên: 559
Nhập: 24-November 05
Bài viết: 19
Tiền mặt: 130
Thanked: 58
Cấp bậc: 3
------
Giới tính: Male
------
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





These are the edits needed to patch the new exploit in IPB.

For IPB 2.0.x only

Open /sources/functions.php

Find:
CODE

$ibforums->forum_read[$id] = $stamp;


Replace with:
CODE



                       $ibforums->forum_read[ intval($id) ] = intval($stamp);


Find:
CODE



   /*-------------------------------------------------------------------------*/
   // Makes incoming info "safe"              
   /*-------------------------------------------------------------------------*/


Add above:
CODE




   /*-------------------------------------------------------------------------*/
   // Makes topics read or forum read cookie safe        
   /*-------------------------------------------------------------------------*/
   /**
   * Makes int based arrays safe
   * XSS Fix: Ticket: 243603
   * Problem with cookies allowing SQL code in keys
   *
   * @param    array    Array
   * @return    array    Array (Cleaned)
   * @since    2.1.4(A)
   */
   function clean_int_array( $array=array() )
   {
       $return = array();
       
       if( !is_array($array) OR count($array) < 1 )
       {
           return $return;
       }
       
       foreach( $array as $k => $v )
       {
           $return[ intval($k) ] = intval($v);
       }
       
       return $return;
   }
 


Saved & upload /sources/functions.php

Open /sources/forums.php

Find:
CODE



           $this->read_array = unserialize(stripslashes($read));


Replace with:
CODE



           $this->read_array = $std->clean_int_array( unserialize(stripslashes($read)) );


Save & upload /sources/forums.php

Open /sources/search.php

Find:
CODE



           $this->read_array = unserialize(stripslashes($read));


Replace with:
CODE



           $this->read_array = $std->clean_int_array( unserialize(stripslashes($read)) );


Save & upload /sources/search.php

Open /sources/topics.php

Find:
CODE



           $this->read_array = unserialize(stripslashes($read));


Replace with:
CODE



           $this->read_array = $std->clean_int_array( unserialize(stripslashes($read)) );


Save & upload /sources/topics.php

Open /sources/usercp.php

Find:
CODE



           $topic_array = array_slice( array_keys( $topics ), 0, 5 );


Add below:
CODE


           $topic_array = $std->clean_int_array( $topic_array );


Save & upload /sources/usercp.php


That's it! You now have the security patch applied!


*********************************


For IPB 2.1.x


Open /sources/ipsclass.php

Find:
CODE



                       $this->forum_read[$id] = $stamp;


Replace with:
CODE



                       $this->forum_read[ intval($id) ] = intval($stamp);


Find:
CODE



   /*-------------------------------------------------------------------------*/
   // Makes incoming info "safe"              
   /*-------------------------------------------------------------------------*/


Add Above:
CODE



   /*-------------------------------------------------------------------------*/
   // Makes topics read or forum read cookie safe        
   /*-------------------------------------------------------------------------*/
   /**
   * Makes int based arrays safe
   * XSS Fix: Ticket: 243603
   * Problem with cookies allowing SQL code in keys
   *
   * @param    array    Array
   * @return    array    Array (Cleaned)
   * @since    2.1.4(A)
   */
   function clean_int_array( $array=array() )
   {
       $return = array();
       
       if ( is_array( $array ) and count( $array ) )
       {
           foreach( $array as $k => $v )
           {
               $return[ intval($k) ] = intval($v);
           }
       }
       
       return $return;
   }


Save & upload /sources/ipsclass.php

Open sources/action_public/topics.php

Find:
CODE



           $this->read_array = unserialize(stripslashes($read));


Replace with:

CODE



           $this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) );


Save & upload /sources/action_public/topics.php

Open sources/action_public/usercp.php

Find:
CODE



           $topic_array = array_slice( array_keys( $topics ), 0, 5 );


Add Below:
CODE



           $topic_array = $this->ipsclass->clean_int_array( $topic_array );


Save & upload /sources/action_public/usercp.php

Open sources/action_public/search.php

Find:
[code]


           $this->read_array = unserialize(stripslashes($read));


Replace with:
CODE



           $this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) );


Save & upload /sources/action_public/search.php

Open sources/action_public/forums.php

Find:
CODE



           $this->read_array = unserialize(stripslashes($read));


Replace with:
CODE


           $this->read_array = $this->ipsclass->clean_int_array( unserialize(stripslashes($read)) );


Save & upload /sources/action_public/forums.php


Done for IPB 2.1.x



--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
mamen   Security Update Edits   Jan 21 2006, 03:53 AM


Thank you! Reply to this topicTopic OptionsStart new topic
 

Bản Rút Gọn Bây giờ là: 18th July 2025 - 04:38 PM
Home | Mạng xã hội | Blog | Thiệp điện tử | Tìm kiếm | Thành viên | Sổ lịch