Skip to content

Commit

Permalink
upgrade version, fix security issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dweeves committed Aug 30, 2020
1 parent 18bd9ec commit dde71de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions magmi/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
------------------------------------------------
- RELEASE NOTES FOR MAGMI 0.7.24 -
-------------------------------------------------

IMPORTANT Security fix, remove default login magmi:magmi since it can be exploited.

------------------------------------------------
- RELEASE NOTES FOR MAGMI 0.7.23 -
-------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion magmi/inc/magmi_auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public function __construct($user,$pass){


public function authenticate(){
if (!$this->_hasDB) return ($this->user == 'magmi' && $this->pass == 'magmi');
if(!$this->_hasDB) {
die("Please create magmi.ini file in magmi/conf directory , by copying & editing magmi.ini.default file and filling appropriate values");
}
$tn=$this->tablename('admin_user');
$result = $this->select("SELECT * FROM $tn WHERE username = ?",array($this->user))->fetch(PDO::FETCH_ASSOC);
return $this->validatePass($result['password'],$this->pass);
Expand Down
2 changes: 1 addition & 1 deletion magmi/inc/magmi_version.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
class Magmi_Version
{
public static $version="0.7.23-git";
public static $version="0.7.24-git";
}
2 changes: 1 addition & 1 deletion magmi/web/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function authenticate($username="",$password=""){
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate:Basic realm="Magmi"');
header('HTTP/1.0 401 Unauthorized');
echo 'You must be logged in to use Magmi';
echo 'You must be logged into magento admin to use Magmi';
die();
} else {
if (!authenticate($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])){
Expand Down

0 comments on commit dde71de

Please sign in to comment.