Để cập nhật lỗ hổng bảo mật này bạn có thể nâng cấp trực tiếp lên bản PrestaShop 1.3.1.Download PrestaShop v.1.3.1 tại đây
hoặc thay đổi một số files sau
-Chú ý: sao lưu file trước khi sửa đổi.
File: /config/smarty.config.inc.php
Where: At the end of the file, before "?>"
Add: $smarty->register_modifier('secureReferrer', array('Tools', 'secureReferrer'));
File: /modules/paypalapi/error.tpl
Where: line 13
Replace: {$smarty.server.HTTP_REFERER}
By: {$smarty.server.HTTP_REFERER|secureReferrer}
File: /themes/prestashop/errors.tpl :
Where: line 9
Replace: {$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'}
By: {$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}
File: /themes/prestashop/shopping-cart.tpl :
Where: line 255
Replace: {$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'}
By: {$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}
File: /admin/login.php
Where: line 67
Replace:
$cookie->passwd = $employee->passwd;
$cookie->write();
By:
$cookie->passwd = $employee->passwd;
$cookie->remote_addr = ip2long($_SERVER['REMOTE_ADDR']);
$cookie->write();
File: /admin/confirm.php
Where: Line 22
Replace: $referer = rawurldecode(Tools::getValue('referer'));
By: $referer = Tools::htmlentitiesUTF8(rawurldecode(Tools::getValue('referer')));
File: /classes/Tools.php
Where: Line 17
After "class Tools
{"
Add these two functions:
/**
* Get the server variable SERVER_NAME
*
* @param string $referrer URL referrer
*/
static function getServerName()
{
if (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) AND $_SERVER['HTTP_X_FORWARDED_SERVER'])
return $_SERVER['HTTP_X_FORWARDED_SERVER'];
return $_SERVER['SERVER_NAME'];
}
/**
* Secure an URL referrer
*
* @param string $referrer URL referrer
*/
static public function secureReferrer($referrer)
{
if (preg_match('/^http[s]?:\/\/'.self::getServerName().'\/.*$/Ui', $referrer))
return $referrer;
return __PS_BASE_URI__;
}
File: /classes/Cookie.php
Where: Line 164
Replace the function isLoggedBack() by this function:
function isLoggedBack()
{
/* Employee is valid only if it can be load and if cookie password is the same as database one */
if ($this->id_employee AND Validate::isUnsignedId($this->id_employee) AND
Employee::checkPassword(intval($this->id_employee), $this->passwd) AND (!isset($this->_content['remote_addr']) OR
$this->_content['remote_addr'] == ip2long($_SERVER['REMOTE_ADDR'])))
return true;
return false;
}
Click here to download PrestaShop v.1.3.1
Nguồn PrestaShop blog
http://www.prestashop.com/blog/article/prestashop_v131_important_security_update/
| Bổ sung Memcached vào PrestaShop 1.4 < Lùi | Tiếp theo > Download PrestaShop 1.3 alpha 2 |
|---|
- 11/07/2011 21:02 - Download Prestashop 1.5
- 17/12/2010 23:07 - Download PrestaShop 1.4
- 17/12/2010 23:03 - Bổ sung Memcached vào PrestaShop 1.4
- 01/03/2010 11:36 - Download PrestaShop 1.3 alpha 2
- 09/12/2009 15:00 - Download PrestaShop 1.2.5 final
- 11/09/2009 10:21 - Download PrestaShop 1.2.3.0
- 12/07/2009 19:22 - Chức năng mới trong PrestaShop 1.2
- 02/06/2009 22:46 - Một số gian hàng trực tuyến nổi bật xây dựng trên PrestaShop e-Commerce
Download Game bóng đá PES8 Việt Nam
Tải game bóng đá FiFa 09
Tải game Dragon ball Z - 7 viên ngọc rồng
Tải Game Bóng Đá Pro Evolution Soccer 6 Việt Nam
Download PES 2011 patch Việt Nam PESVN
Tải Game Bóng Đá FIFA 2009 RIP 1 CD
Download Pro Evolution Soccer 2011
Download Game THE SIMS 3
Tải Game bóng đá PES 2009
Download PES 2011 demo
Thay đổi màn hình đăng nhập Windows 7 bằng tay
Một số hàm hay dùng trong JavaScript
Kiểm soát hoàn toàn trỏ chuột bằng bàn phím với NeatMouse
Choáng với concept của Windows Phone 8
Những đặc điểm ưu việt của Windows Phone
Ứng dụng gọi điện VoIP Viber sắp có mặt trên Windows Phone
Game Diablo 3 sắp có mặt trên Windows Phone Marketplace
37 trang css & xhtml web template miễn phí tuyệt đẹp
Những điều cơ bản cần biết về bàn phím chơi game - Gaming Keyboard
L.A. Noire: The Complete Edition - THETA [Full ISO/Action/2011] [13.37GB]
Download 7554 demo
Download Game PC, cập nhật liên tục (torrent)
PES 2012 ra mắt bản mở rộng đầu tiên vào 11/10
PES2012 - Full version - Ngôn ngữ và bình luận tiếng Anh
PES2012 - Blurry disable làm mịn đồ họa
PES 2011 PATCH 4.1 - TRANSFER UPDATE - RELEASED
Bộ sưu tập free PrestaShop Themes phần 3
Bộ sưu tập theme Prestashop miễn phí phần 2
Top 10 Free PrestaShop Themes
Download Prestashop 1.5
Download PrestaShop 1.4
Bổ sung Memcached vào PrestaShop 1.4
Hướng dẫn tích hợp Ngân Lượng vào PrestaShop
Cài đặt PrestaShop
Thiết kế giao diện PrestaShop Theme
Hướng dẫn cài đặt themes trong PrestaShop
Hướng dẫn cách thêm ngôn ngữ cho PrestaShop
Bộ sưu tập Giao diện Premium PrestaShop Themes chuyên nghiệp
Giới thiệu về website thương mại điện tử 2.0 Prestashop
Tạo và sửa Flash dễ dàng với Sothink SWF Quicker v4.5 Build 456


