From 37379942b49b2d5174e56e2b4b7c0e8a0e926e15 Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Tue, 25 Nov 2014 18:56:10 +0100 Subject: [PATCH 1/3] Use PHP sha1() function instead of MySQL SHA1() --- src/bb-modules/Staff/Service.php | 2 +- src/install/index.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bb-modules/Staff/Service.php b/src/bb-modules/Staff/Service.php index 6a42a52e3..f08152304 100644 --- a/src/bb-modules/Staff/Service.php +++ b/src/bb-modules/Staff/Service.php @@ -43,7 +43,7 @@ class Service implements InjectionAwareInterface $this->di['events_manager']->fire(array('event'=>'onBeforeAdminLogin', 'params'=>$event_params)); - $model = $this->di['db']->findOne('Admin', "email = ? AND pass = SHA1(?) AND status = ?", array( $email, $password, 'active' )); + $model = $this->di['db']->findOne('Admin', "email = ? AND pass = ? AND status = ?", array( $email, sha1($password), 'active' )); if(!$model instanceof \Model_Admin ) { $this->di['events_manager']->fire(array('event'=>'onEventAdminLoginFailed', 'params'=>$event_params)); throw new \Box_Exception('Check your login details', null, 403); diff --git a/src/install/index.php b/src/install/index.php index bc39b5788..69b86c8fc 100644 --- a/src/install/index.php +++ b/src/install/index.php @@ -289,8 +289,8 @@ final class Box_Installer throw new Exception($err); } - $sql = "INSERT INTO admin (role, name, email, pass, protected, created_at, updated_at) VALUES('admin', '%s', '%s', SHA1('%s'), 1, '%s', '%s');"; - $sql = sprintf($sql, mysql_real_escape_string($ns->get('admin_name')), mysql_real_escape_string($ns->get('admin_email')), mysql_real_escape_string($ns->get('admin_pass')), date('c'), date('c')); + $sql = "INSERT INTO admin (role, name, email, pass, protected, created_at, updated_at) VALUES('admin', '%s', '%s', '%s', 1, '%s', '%s');"; + $sql = sprintf($sql, mysql_real_escape_string($ns->get('admin_name')), mysql_real_escape_string($ns->get('admin_email')), mysql_real_escape_string(sha1($ns->get('admin_pass'))), date('c'), date('c')); $res = mysql_query($sql, $link); if(!$res) { throw new Exception(mysql_error()); From 97cb13b6174ba5ac6e1097bca9ab673c44db9848 Mon Sep 17 00:00:00 2001 From: 4Giedrius <4giedrius@gmail.com> Date: Tue, 2 Dec 2014 16:51:18 +0200 Subject: [PATCH 2/3] Updated CHANGELOG --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c9bf9efe..26f3c6a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +Release 4.12 (2014-12-01) +------------------------------------------------------------------------------ + +* Client password hashing updated (php password_* functions are being used) +* Added mass delete functionality in admin area +* Ability to set promotional code for client groups +* Ability for administrator to edit order config +* ResellerClub adapter updated +* Pagination fixed +* Bug fixes + Release 4.11.3(2014-11-03) ------------------------------------------------------------------------------ From eef66c35437ffc73afb32a13a4677284c9d55a8f Mon Sep 17 00:00:00 2001 From: 4Giedrius <4giedrius@gmail.com> Date: Tue, 2 Dec 2014 17:22:18 +0200 Subject: [PATCH 3/3] Changelog file updates --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f3c6a27..095bacd87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -Release 4.12 (2014-12-01) +Release 4.12 (2014-12-02) ------------------------------------------------------------------------------ * Client password hashing updated (php password_* functions are being used) @@ -9,7 +9,7 @@ Release 4.12 (2014-12-01) * Pagination fixed * Bug fixes -Release 4.11.3(2014-11-03) +Release 4.11.3 (2014-11-03) ------------------------------------------------------------------------------ * BoxBilling going open source