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ông ty bảo hộ lao động tại Hồ Chí Minh tốt      ♥ Lập và nộp tờ khai thuế TNDN      ♥ Top giày bảo hộ chống đinh phổ biến hiện nay      ♥ KY NIEM CAP 3 2003-2005      ♥ Nguyên lý hoạt động chi tiết máy cắt laser là gì?      ♥ マルチャー 価格      ♥ 土浦 エルメス買取      ♥ Hồ sơ xin visa du lịch Úc      ♥ Top 5 thương hiệu giày bảo hộ tại Đồng Nai      ♥ 切株カッター      ♥ Cách lập tờ khai quyết toán thuế TNCN      ♥ Hạt Nhựa Màu Nano Ổn Định Màu Sắc Khi Gia Nhiệt      ♥ 建機アタッチメント 販売      ♥ Lý do nên chọn giày bảo hộ thể thao      ♥ Ứng dụng băng tải PVC trắng trong công nghiệp      ♥ Tại sao nên lựa chọn và sử dụng băng tải Intech?      ♥ Top giày bảo hộ chống điện áp chất lượng      ♥ Các ứng dụng băng tải xếp ngành thực phẩm      ♥ Ưu nhược điểm băng tải con lăn nhựa cần biết      ♥ Băng tải xích inox Intech vận chuyển bền bỉ      
 
Reply to this topicStart new topicStart Poll

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

Thank you! Reply to this topicTopic OptionsStart new topic
 

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