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 Húng quế lông nhìn thế nào?      ♥ Húng quế lông nhìn thế nào?      ♥ Phụ Gia Nhựa Giúp Tăng Độ Dẻo Cho Sản Phẩm Nhựa      ♥ 仮設資材      ♥ Top thương hiệu giày bảo hộ bán chạy      ♥ Cấp mã hddt theo từng lần phát sinh      ♥ Đu đủ nào tốt hơn? Xanh hay chín?      ♥ Những lợi ích bất ngờ của lá đu đủ tươi v      ♥ https://vnvista.com/forums/index.php?automodule=bl      ♥ Tác hại khi dùng giày bảo hộ kém chất lượng      ♥ Ủy nhiệm lập hóa đơn điện tử khi nào?      ♥ Xu hướng bảo hộ lao động tại Đà Nẵng      ♥ SHEET Bến đỗ hay bão tố      ♥ SHEET Gợi nhớ quê hương      ♥ Thợ cơ khí thường mắc khi chọn giày bảo hộ      ♥ Hạt Nhựa Nguyên Sinh Có Khả Năng Cách Nhiệt Tốt      ♥ Quản lý dữ liệu hóa đơn điện tử      ♥ Quy định về trang thiết bị bảo hộ lao động      ♥ ra mắt Visa Trung Quốc loại K      ♥ Địa chỉ mua bảo hộ lao động tại Sài Gò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à: 24th October 2025 - 07:15 AM
Home | Mạng xã hội | Blog | Thiệp điện tử | Tìm kiếm | Thành viên | Sổ lịch