Forums / Addon Admin Tools / Encrypted Master Password support

Encrypted Master Password support

Views: 53,602

Results 41 to 60 of 210
3 Feb 2014, 4:53 PM
#41
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Encrypted Master Password support

I am getting this error as well. The store does not have SSL installed. Can the Place Order button be used without SSL installed?

torvista:

...because the link was being built without SSL due to admin/includes/configure.php
define('ENABLE_SSL_CATALOG', 'true');
was set to false (incorrectly).

Danielle

3 Feb 2014, 7:49 PM
#42
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

Danielle:

I am getting this error as well. The store does not have SSL installed. Can the Place Order button be used without SSL installed?
I do my local development using xampp without SSL and don't have an issue using the "Place Order" button from one of my test installations. Are you sure that your admin's /includes/configure.php file doesn't indicate that your store-front uses SSL? If you're not using SSL, then your admin's configure.php file should look similar to:

/**
 * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
 * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
 */
  define('HTTP_SERVER', 'http://www.example.com');
  define('HTTPS_SERVER', 'https://www.example.com');
  define('HTTP_CATALOG_SERVER', 'http://www.example.com');
  define('HTTPS_CATALOG_SERVER', 'https://www.example.com');

  // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_ADMIN', 'false');

  // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_CATALOG', 'false');
3 Feb 2014, 9:17 PM
#43
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

No, they are both set to false. I just discovered that the login page on the front end is blank even for regular customers though, it's not actually the place order button that is the issue. The problem is with the code in the login/header_php.php file, but I have been unable to determine the cause. No log files are being generated. The site is on version 1.5.1.

lat9:

I do my local development using xampp without SSL and don't have an issue using the "Place Order" button from one of my test installations. Are you sure that your admin's /includes/configure.php file doesn't indicate that your store-front uses SSL? If you're not using SSL, then your admin's configure.php file should look similar to:

/**

  • WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
  • To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
    */
    define('HTTP_SERVER', 'http://www.example.com');
    define('HTTPS_SERVER', 'https://www.example.com');
    define('HTTP_CATALOG_SERVER', 'http://www.example.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.example.com');

// secure webserver for admin? Valid choices are 'true' or 'false' (including quotes).
define('ENABLE_SSL_ADMIN', 'false');

// secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes).
define('ENABLE_SSL_CATALOG', 'false');

Danielle

3 Feb 2014, 11:06 PM
#44
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

I suggest that you open a new thread about your login page issue; post the contents of your /includes/modules/pages/login/header_php.php file using the 'code' tag (the # symbol in the formatting bar) and check your /logs (or /cache if you're running v1.5.0) folder for any debug-log files.

3 Feb 2014, 11:20 PM
#45
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

OK thanks, I will do that then. I just thought it was supposed to go in this thread since it's the code from this module that is making the page go blank. As soon as I remove these code edits, it works fine. No logs are being generated whatsoever though, it's really strange.

lat9:

I suggest that you open a new thread about your login page issue; post the contents of your /includes/modules/pages/login/header_php.php file using the 'code' tag (the # symbol in the formatting bar) and check your /logs (or /cache if you're running v1.5.0) folder for any debug-log files.

Danielle

4 Feb 2014, 12:53 PM
#46
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

Danielle:

OK thanks, I will do that then. I just thought it was supposed to go in this thread since it's the code from this module that is making the page go blank. As soon as I remove these code edits, it works fine. No logs are being generated whatsoever though, it's really strange.
OK, that's different; if removing the module's code corrects your overall login problem, then the issue (obviously) lies with the code you've installed for this module!

Specifically, which "code edits" do you remove to cause your login page to work again? What version of Encrypted Master Password are you running? What Zen Cart version?

4 Feb 2014, 4:04 PM
#47
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

Yes, I just reread my post where I first mentioned my blank login and realized I said I didn't know the cause, but I knew it was this mod, just not what in the mod was causing the issue. So I didn't do a very good job of explaining what was going on. Sorry for the confusion!

I am using the most recent version of the mod as it said it was for 1.5.2 but backwards compatible. The site is running Zen-Cart 1.5.1.

This is the block of code that is breaking the login:

      // Check that password is good
//-bof-Encrypted Master Password by stagebrace *** 1/1
      //- Start modifications by lat9:
//-bof-a-v1.6.0
    } elseif ($emp_login === true) {
      $ProceedToLogin = true;
      $_SESSION['emp_admin_login'] = true;
      $_SESSION['emp_admin_id'] = (int)$_POST['aID'];
//-bof-a-v1.7.0
      $sql_data_array = array( 'access_date' => 'now()',
                               'admin_id' => $_SESSION['emp_admin_id'],
                               'page_accessed' => 'login.php',
                               'page_parameters' => '',
                               'ip_address' => substr($_SERVER['REMOTE_ADDR'],0,45),
                               'gzpost' => gzdeflate( json_encode( array ( 'action' => 'emp_admin_login' )), 7),
                               'flagged' => 0,
                               'attention' => '',
                               );
      zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
//-eof-a-v1.7.0
//-eof-a-v1.6.0
      
    } else {
      //--- Either specific admin ID or an admin within a specific admin profile can use their password to login.
      if (!defined('EMP_LOGIN_ADMIN_ID')) define ('EMP_LOGIN_ADMIN_ID', 1);  /*lat9-a/c*/
      $get_admin_query = "SELECT admin_id, admin_pass
                          FROM " . TABLE_ADMIN . "
                          WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID;  /*lat9-c*/
      $check_administrator = $db->Execute($get_admin_query);
      $customer = (zen_validate_password($password, $check_customer->fields['customers_password']));
      $administrator = (zen_validate_password($password, $check_administrator->fields['admin_pass']));
      if ($customer) {
        $ProceedToLogin = true;
        
      } elseif ($administrator) {
          $ProceedToLogin = true;
          $_SESSION['emp_admin_login'] = true;  /*lat9-a*/
          $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
          
      } else {
//-bof-lat9-a
        if (!defined('EMP_LOGIN_ADMIN_PROFILE_ID')) define ('EMP_LOGIN_ADMIN_PROFILE_ID', 1);  /*lat9-a*/
        $admin_profile_query = "SELECT admin_id, admin_pass 
                                  FROM " . TABLE_ADMIN . " 
                                  WHERE admin_profile = " . (int)EMP_LOGIN_ADMIN_PROFILE_ID;
        $admin_profiles = $db->Execute($admin_profile_query);
//-eof-lat9-a
        $ProceedToLogin = false;
//-bof-lat9-a
        while (!$admin_profiles->EOF && !$ProceedToLogin) {
          $ProceedToLogin = zen_validate_password($password, $admin_profiles->fields['admin_pass']);
          if ($ProceedToLogin) {
            $_SESSION['emp_admin_login'] = true;
            $_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
          }
          $admin_profiles->MoveNext();
        }
//-eof-lat9-a
      }
    }
      if (!($ProceedToLogin)) {
//-eof-Encrypted Master Password by stagebrace *** 1/1

lat9:

OK, that's different; if removing the module's code corrects your overall login problem, then the issue (obviously) lies with the code you've installed for this module!

Specifically, which "code edits" do you remove to cause your login page to work again? What version of Encrypted Master Password are you running? What Zen Cart version?

Danielle

4 Feb 2014, 4:28 PM
#48
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

Danielle, I'll have to investigate further tomorrow. Do you have any myDebug*.log files in your /logs folder? Those usually accompany a blank screen.

4 Feb 2014, 4:55 PM
#49
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

No, that is really strange too, there are no debug logs at all. I've tried all kinds of permissions settings, but nothing is showing up.

lat9:

Danielle, I'll have to investigate further tomorrow. Do you have any myDebug*.log files in your /logs folder? Those usually accompany a blank screen.

Danielle

5 Feb 2014, 1:14 PM
#50
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

Danielle, on a hunch, could/would you try commenting out a couple of lines in the /includes/modules/pages/login/header_php.php and let me know if that corrects the issue?

      // Check that password is good
//-bof-Encrypted Master Password by stagebrace *** 1/1
      //- Start modifications by lat9:
//-bof-a-v1.6.0
    } elseif ($emp_login === true) {
      $ProceedToLogin = true;
      $_SESSION['emp_admin_login'] = true;
      $_SESSION['emp_admin_id'] = (int)$_POST['aID'];
//-bof-a-v1.7.0
/*
      $sql_data_array = array( 'access_date' => 'now()',
                               'admin_id' => $_SESSION['emp_admin_id'],
                               'page_accessed' => 'login.php',
                               'page_parameters' => '',
                               'ip_address' => substr($_SERVER['REMOTE_ADDR'],0,45),
                               'gzpost' => gzdeflate( json_encode( array ( 'action' => 'emp_admin_login' )), 7),
                               'flagged' => 0,
                               'attention' => '',
                               );
      zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
*/
//-eof-a-v1.7.0
//-eof-a-v1.6.0
      
    } else {
      //--- Either specific admin ID or an admin within a specific admin profile can use their password to login.
      if (!defined('EMP_LOGIN_ADMIN_ID')) define ('EMP_LOGIN_ADMIN_ID', 1);  /*lat9-a/c*/
      $get_admin_query = "SELECT admin_id, admin_pass
                          FROM " . TABLE_ADMIN . "
                          WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID;  /*lat9-c*/
      $check_administrator = $db->Execute($get_admin_query);
      $customer = (zen_validate_password($password, $check_customer->fields['customers_password']));
      $administrator = (zen_validate_password($password, $check_administrator->fields['admin_pass']));
      if ($customer) {
        $ProceedToLogin = true;
        
      } elseif ($administrator) {
          $ProceedToLogin = true;
          $_SESSION['emp_admin_login'] = true;  /*lat9-a*/
          $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
          
      } else {
//-bof-lat9-a
        if (!defined('EMP_LOGIN_ADMIN_PROFILE_ID')) define ('EMP_LOGIN_ADMIN_PROFILE_ID', 1);  /*lat9-a*/
        $admin_profile_query = "SELECT admin_id, admin_pass 
                                  FROM " . TABLE_ADMIN . " 
                                  WHERE admin_profile = " . (int)EMP_LOGIN_ADMIN_PROFILE_ID;
        $admin_profiles = $db->Execute($admin_profile_query);
//-eof-lat9-a
        $ProceedToLogin = false;
//-bof-lat9-a
        while (!$admin_profiles->EOF && !$ProceedToLogin) {
          $ProceedToLogin = zen_validate_password($password, $admin_profiles->fields['admin_pass']);
          if ($ProceedToLogin) {
            $_SESSION['emp_admin_login'] = true;
            $_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
          }
          $admin_profiles->MoveNext();
        }
//-eof-lat9-a
      }
    }
      if (!($ProceedToLogin)) {
//-eof-Encrypted Master Password by stagebrace *** 1/1  
5 Feb 2014, 1:31 PM
#51
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

Danielle, to make sure that errors are properly being logged (i.e. the DIR_FS_LOGS constant and associated permissions are correct), you could "force" an error on the login page by adding the bit in red (just make sure to remove it after you've verified that a debug-log file is created!)

      // Check that password is good
//-bof-Encrypted Master Password by stagebrace *** 1/1
      //- Start modifications by lat9:
//-bof-a-v1.6.0
    } elseif ($emp_login === true &&) {
      $ProceedToLogin = true;
      $_SESSION['emp_admin_login'] = true;
      $_SESSION['emp_admin_id'] = (int)$_POST['aID'];
//-bof-a-v1.7.0
/*
      $sql_data_array = array( 'access_date' => 'now()',
                               'admin_id' => $_SESSION['emp_admin_id'],
                               'page_accessed' => 'login.php',
                               'page_parameters' => '',
                               'ip_address' => substr($_SERVER['REMOTE_ADDR'],0,45),
                               'gzpost' => gzdeflate( json_encode( array ( 'action' => 'emp_admin_login' )), 7),
                               'flagged' => 0,
                               'attention' => '',
                               );
      zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
*/
//-eof-a-v1.7.0
//-eof-a-v1.6.0
      
    } else {
      //--- Either specific admin ID or an admin within a specific admin profile can use their password to login.
      if (!defined('EMP_LOGIN_ADMIN_ID')) define ('EMP_LOGIN_ADMIN_ID', 1);  /*lat9-a/c*/
      $get_admin_query = "SELECT admin_id, admin_pass
                          FROM " . TABLE_ADMIN . "
                          WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID;  /*lat9-c*/
      $check_administrator = $db->Execute($get_admin_query);
      $customer = (zen_validate_password($password, $check_customer->fields['customers_password']));
      $administrator = (zen_validate_password($password, $check_administrator->fields['admin_pass']));
      if ($customer) {
        $ProceedToLogin = true;
        
      } elseif ($administrator) {
          $ProceedToLogin = true;
          $_SESSION['emp_admin_login'] = true;  /*lat9-a*/
          $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
          
      } else {
//-bof-lat9-a
        if (!defined('EMP_LOGIN_ADMIN_PROFILE_ID')) define ('EMP_LOGIN_ADMIN_PROFILE_ID', 1);  /*lat9-a*/
        $admin_profile_query = "SELECT admin_id, admin_pass 
                                  FROM " . TABLE_ADMIN . " 
                                  WHERE admin_profile = " . (int)EMP_LOGIN_ADMIN_PROFILE_ID;
        $admin_profiles = $db->Execute($admin_profile_query);
//-eof-lat9-a
        $ProceedToLogin = false;
//-bof-lat9-a
        while (!$admin_profiles->EOF && !$ProceedToLogin) {
          $ProceedToLogin = zen_validate_password($password, $admin_profiles->fields['admin_pass']);
          if ($ProceedToLogin) {
            $_SESSION['emp_admin_login'] = true;
            $_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
          }
          $admin_profiles->MoveNext();
        }
//-eof-lat9-a
      }
    }
      if (!($ProceedToLogin)) {
//-eof-Encrypted Master Password by stagebrace *** 1/1
5 Feb 2014, 4:18 PM
#52
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

No, I am still getting the blank login page and no debug logs.

lat9:

Danielle, on a hunch, could/would you try commenting out a couple of lines in the /includes/modules/pages/login/header_php.php and let me know if that corrects the issue?

  // Check that password is good

//-bof-Encrypted Master Password by stagebrace *** 1/1
//- Start modifications by lat9:
//-bof-a-v1.6.0
} elseif ($emp_login === true) {
$ProceedToLogin = true;
$_SESSION['emp_admin_login'] = true;
$_SESSION['emp_admin_id'] = (int)$_POST['aID'];
//-bof-a-v1.7.0
/
$sql_data_array = array( 'access_date' => 'now()',
'admin_id' => $_SESSION['emp_admin_id'],
'page_accessed' => 'login.php',
'page_parameters' => '',
'ip_address' => substr($_SERVER['REMOTE_ADDR'],0,45),
'gzpost' => gzdeflate( json_encode( array ( 'action' => 'emp_admin_login' )), 7),
'flagged' => 0,
'attention' => '',
);
zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
/
//-eof-a-v1.7.0
//-eof-a-v1.6.0

} else {
  //--- Either specific admin ID or an admin within a specific admin profile can use their password to login.
  if (!defined('EMP_LOGIN_ADMIN_ID')) define ('EMP_LOGIN_ADMIN_ID', 1);  /*lat9-a/c*/
  $get_admin_query = "SELECT admin_id, admin_pass
                      FROM " . TABLE_ADMIN . "
                      WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID;  /*lat9-c*/
  $check_administrator = $db->Execute($get_admin_query);
  $customer = (zen_validate_password($password, $check_customer->fields['customers_password']));
  $administrator = (zen_validate_password($password, $check_administrator->fields['admin_pass']));
  if ($customer) {
    $ProceedToLogin = true;
    
  } elseif ($administrator) {
      $ProceedToLogin = true;
      $_SESSION['emp_admin_login'] = true;  /*lat9-a*/
      $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
      
  } else {

//-bof-lat9-a
if (!defined('EMP_LOGIN_ADMIN_PROFILE_ID')) define ('EMP_LOGIN_ADMIN_PROFILE_ID', 1); /lat9-a/
$admin_profile_query = "SELECT admin_id, admin_pass
FROM " . TABLE_ADMIN . "
WHERE admin_profile = " . (int)EMP_LOGIN_ADMIN_PROFILE_ID;
$admin_profiles = $db->Execute($admin_profile_query);
//-eof-lat9-a
$ProceedToLogin = false;
//-bof-lat9-a
while (!$admin_profiles->EOF && !$ProceedToLogin) {
$ProceedToLogin = zen_validate_password($password, $admin_profiles->fields['admin_pass']);
if ($ProceedToLogin) {
$_SESSION['emp_admin_login'] = true;
$_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
}
$admin_profiles->MoveNext();
}
//-eof-lat9-a
}
}
if (!($ProceedToLogin)) {
//-eof-Encrypted Master Password by stagebrace *** 1/1

Danielle

5 Feb 2014, 7:32 PM
#53
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

lat9:

Danielle, to make sure that errors are properly being logged (i.e. the DIR_FS_LOGS constant and associated permissions are correct), you could "force" an error on the login page by adding the bit in red (just make sure to remove it after you've verified that a debug-log file is created!)

  // Check that password is good

//-bof-Encrypted Master Password by stagebrace *** 1/1
//- Start modifications by lat9:
//-bof-a-v1.6.0
} elseif ($emp_login === true &&) {
$ProceedToLogin = true;
$_SESSION['emp_admin_login'] = true;
$_SESSION['emp_admin_id'] = (int)$_POST['aID'];
//-bof-a-v1.7.0
/*
$sql_data_array = array( 'access_date' => 'now()',
'admin_id' => $_SESSION['emp_admin_id'],
'page_accessed' => 'login.php',
'page_parameters' => '',
'ip_address' => substr($_SERVER['REMOTE_ADDR'],0,45),
'gzpost' => gzdeflate( json_encode( array ( 'action' => 'emp_admin_login' )), 7),
'flagged' => 0,
'attention' => '',
);
zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
*/
//-eof-a-v1.7.0
//-eof-a-v1.6.0

} else {
  //--- Either specific admin ID or an admin within a specific admin profile can use their password to login.
  if (!defined('EMP_LOGIN_ADMIN_ID')) define ('EMP_LOGIN_ADMIN_ID', 1);  /*lat9-a/c*/
  $get_admin_query = "SELECT admin_id, admin_pass
                      FROM " . TABLE_ADMIN . "
                      WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID;  /*lat9-c*/
  $check_administrator = $db->Execute($get_admin_query);
  $customer = (zen_validate_password($password, $check_customer->fields['customers_password']));
  $administrator = (zen_validate_password($password, $check_administrator->fields['admin_pass']));
  if ($customer) {
    $ProceedToLogin = true;
    
  } elseif ($administrator) {
      $ProceedToLogin = true;
      $_SESSION['emp_admin_login'] = true;  /*lat9-a*/
      $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
      
  } else {

//-bof-lat9-a
if (!defined('EMP_LOGIN_ADMIN_PROFILE_ID')) define ('EMP_LOGIN_ADMIN_PROFILE_ID', 1); /lat9-a/
$admin_profile_query = "SELECT admin_id, admin_pass
FROM " . TABLE_ADMIN . "
WHERE admin_profile = " . (int)EMP_LOGIN_ADMIN_PROFILE_ID;
$admin_profiles = $db->Execute($admin_profile_query);
//-eof-lat9-a
$ProceedToLogin = false;
//-bof-lat9-a
while (!$admin_profiles->EOF && !$ProceedToLogin) {
$ProceedToLogin = zen_validate_password($password, $admin_profiles->fields['admin_pass']);
if ($ProceedToLogin) {
$_SESSION['emp_admin_login'] = true;
$_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
}
$admin_profiles->MoveNext();
}
//-eof-lat9-a
}
}
if (!($ProceedToLogin)) {
//-eof-Encrypted Master Password by stagebrace *** 1/1

How about forcing an error to make sure that logs will be written?  Did you try that?
5 Feb 2014, 10:22 PM
#54
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

No, no log files are generated :( I cannot understand it. I have tried every permissions setting on the log directory. The logs directory in configure.php is set correctly. Not sure how else to troubleshoot this. I have never seen a site where the log files just don't work.

lat9:

Danielle, to make sure that errors are properly being logged (i.e. the DIR_FS_LOGS constant and associated permissions are correct), you could "force" an error on the login page by adding the bit in red (just make sure to remove it after you've verified that a debug-log file is created!)

  // Check that password is good

//-bof-Encrypted Master Password by stagebrace *** 1/1
//- Start modifications by lat9:
//-bof-a-v1.6.0
} elseif ($emp_login === true &&) {
$ProceedToLogin = true;
$_SESSION['emp_admin_login'] = true;
$_SESSION['emp_admin_id'] = (int)$_POST['aID'];
//-bof-a-v1.7.0
/*
$sql_data_array = array( 'access_date' => 'now()',
'admin_id' => $_SESSION['emp_admin_id'],
'page_accessed' => 'login.php',
'page_parameters' => '',
'ip_address' => substr($_SERVER['REMOTE_ADDR'],0,45),
'gzpost' => gzdeflate( json_encode( array ( 'action' => 'emp_admin_login' )), 7),
'flagged' => 0,
'attention' => '',
);
zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
*/
//-eof-a-v1.7.0
//-eof-a-v1.6.0

} else {
  //--- Either specific admin ID or an admin within a specific admin profile can use their password to login.
  if (!defined('EMP_LOGIN_ADMIN_ID')) define ('EMP_LOGIN_ADMIN_ID', 1);  /*lat9-a/c*/
  $get_admin_query = "SELECT admin_id, admin_pass
                      FROM " . TABLE_ADMIN . "
                      WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID;  /*lat9-c*/
  $check_administrator = $db->Execute($get_admin_query);
  $customer = (zen_validate_password($password, $check_customer->fields['customers_password']));
  $administrator = (zen_validate_password($password, $check_administrator->fields['admin_pass']));
  if ($customer) {
    $ProceedToLogin = true;
    
  } elseif ($administrator) {
      $ProceedToLogin = true;
      $_SESSION['emp_admin_login'] = true;  /*lat9-a*/
      $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
      
  } else {

//-bof-lat9-a
if (!defined('EMP_LOGIN_ADMIN_PROFILE_ID')) define ('EMP_LOGIN_ADMIN_PROFILE_ID', 1); /lat9-a/
$admin_profile_query = "SELECT admin_id, admin_pass
FROM " . TABLE_ADMIN . "
WHERE admin_profile = " . (int)EMP_LOGIN_ADMIN_PROFILE_ID;
$admin_profiles = $db->Execute($admin_profile_query);
//-eof-lat9-a
$ProceedToLogin = false;
//-bof-lat9-a
while (!$admin_profiles->EOF && !$ProceedToLogin) {
$ProceedToLogin = zen_validate_password($password, $admin_profiles->fields['admin_pass']);
if ($ProceedToLogin) {
$_SESSION['emp_admin_login'] = true;
$_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
}
$admin_profiles->MoveNext();
}
//-eof-lat9-a
}
}
if (!($ProceedToLogin)) {
//-eof-Encrypted Master Password by stagebrace *** 1/1

Danielle

6 Feb 2014, 1:20 PM
#55
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

Would you post the definition for DIR_FS_LOGS from your /includes/configure.php file?

7 Feb 2014, 5:04 PM
#56
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

Sure:

define('DIR_FS_LOGS', '/home/sites/****/public_html/logs');

I just put in the ****, in the actual file it has the correct info there.

lat9:

Would you post the definition for DIR_FS_LOGS from your /includes/configure.php file?

Danielle

7 Feb 2014, 5:22 PM
#57
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Encrypted Master Password support

Curious, it looks properly formed (i.e. no ending /). Permissions set to 0755? What if you change the definition to

define('DIR_FS_LOGS', DIR_FS_CATALOG . 'logs');
17 Feb 2014, 11:46 PM
#58
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

lat9:

Curious, it looks properly formed (i.e. no ending /). Permissions set to 0755? What if you change the definition to

define('DIR_FS_LOGS', DIR_FS_CATALOG . 'logs');


Nope still no logs showing up.  Permissions are 755.  It's so strange!

Danielle

17 Feb 2014, 11:58 PM
#59
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Encrypted Master Password support

if you hide the EMP code what happens? and do your log files work?

note - do not uninstall EMP

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

10 Mar 2014, 8:32 PM
#60
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Encrypted Master Password support

If I hide the EMP code the login page works fine. There are no log files.

twitchtoo:

if you hide the EMP code what happens? and do your log files work?

note - do not uninstall EMP

Danielle