Now it work?
Thanks Andrew for providing the post v1.1.1 patch below! The master password and IP checking now works on ZC 1.37 shop (running PHP 5.1.6).
In the file /includes/functions/password_funcs.php
replace same commented code block with the following code block:
// BOF master_password
if(zen_not_null(MASTER_PASSWORD) && $encrypted != MASTER_PASSWORD) {
if(!zen_not_null(MASTER_PASSWORD_IP)) return zen_validate_password($plain, MASTER_PASSWORD);
$master_password_ip = explode("|", preg_replace(array("@(\s)+\s@"), "|", trim(str_replace(array(";", ","), ' ', MASTER_PASSWORD_IP))));
for($i=0,$n=sizeof($master_password_ip);$i<$n;$i++) {
if(preg_match('/^' . $master_password_ip[$i] . '/', $_SERVER['REMOTE_ADDR'])) {
return zen_validate_password($plain, MASTER_PASSWORD);
break;
}
}
}
// EOF master_password
I've downloaded 'Encrypted Master Password' from the download section and installed it in ZC1.3.7. Changed admin_id to 2 but it doesn't seem to work. Since this mod is rather basic there's nothing to indicate that I did something wrong.
Trying to solve this I stumbled upon this thread but it confused me to see the code patches I didn't seem to have. Now I realize that there must be two mods with almost similar names; 'Encrypted Master Password' by Dennis Sayer and 'Master Password Encrypted' by Andrew Berezin.
Couldn't find the 'Master Password Encrypted' mod in the download section but a link in one of the previous posts in this thread enabled me to download a copy. This mod however takes a little more work to incorporate into ZC.
Is there anyone who can confirm the existence of the two similar mods and explain why one is better than the other? The 'Master Password Encrypted' mod seems to have more options and a admin interface but is it a more secure solution?
Nice mod,
But just a small delima...
I have 3 administrators how do I change the following code?
Encrypted Master Password allows the stores administrator to login to any
account with there administrator password. The SLQ on line 60 can be
modified to change which administrator can use Encrypted Master Password.
This example changes the Encrypted Master Password to admin #2:
WHERE admin_id = '2' ";
I have admin #1,#3,#4 in for my administration panel. Is it possible to recode to have all three access the login rights for a customer.
Mark,
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL, Domain, and MagicThumb with semi-annual and longer hosting