Thread: Master Password

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Oct 2005
    Posts
    8
    Plugin Contributions
    0

    Default Master Password

    I read about a master password mod in one of the other threads. I went to the downloads but it was not in that section. I am still getting used to the new layout of this site. Can someone let me know where to find this?
    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,183
    Plugin Contributions
    11

    Default Re: Master Password

    As you may have seen throughout the forum, BE SAFE -- BACKUP FIRST.
    That said....
    Look for the following code in your includes/functions/password_funcs.php
    ////
    // This function validates a plain text password with an encrpyted password
    function zen_validate_password($plain, $encrypted) {
    if (zen_not_null($plain) && zen_not_null($encrypted)) {
    // split apart the hash / salt
    $stack = explode(':', $encrypted);
    Replace with:
    ////
    // This function validates a plain text password with an encrpyted password
    function zen_validate_password($plain, $encrypted) {
    if ($plain == MASTER_PASS) { return true; }
    if (zen_not_null($plain) && zen_not_null($encrypted)) {
    // split apart the hash / salt
    $stack = explode(':', $encrypted);
    Run the following sql code on your database:
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Master Password', 'MASTER_PASS', 'yourpassword', 'This password will allow you to login to any customer\'s account.', 1, 23, now(), now(), NULL, NULL);
    NOTE: You may need to add your database prefix (if used) such as:
    INSERT INTO MyDB_configuration (configura
    Once this is done, go to the admin panel to Configuration, My Store and the Master Password option is about 2/3 down the page. The default (as seen in the sql code) is yourpassword.

    This works with several versions of 1.3.01 that I run.

    Last note
    If you want to retain this in future versions consider using the override system in a post by Sermonzone http://www.zen-cart.com/forum/showthread.php?t=36567

    HTH

  3. #3
    Join Date
    Feb 2006
    Posts
    326
    Plugin Contributions
    0

    Default Re: Master Password

    I have been trying to get this to work, but when I run the sql patch, I get the following error message. Any thoughts?
    Thanks,


    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Master Password', 'MASTER_PASS', 'yourpassword', 'This password will allow you to login to any customer's account.', 1, 23, now(), now(), NULL, NULL);

    1064 You have an error in your SQL syntax near 's account.', 1, 23, now(), now(), NULL, NULL)' at line 1
    in:
    [INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Master Password', 'MASTER_PASS', 'yourpassword', 'This password will allow you to login to any customer's account.', 1, 23, now(), now(), NULL, NULL);]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    Give us your best shot!
    http://www.photoimprints.com

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Master Password

    Your code is not showing the backslash \ in front of the apostrophe ' - If you did not enter that it is being misinterpreted.

  5. #5
    Join Date
    Feb 2006
    Posts
    326
    Plugin Contributions
    0

    Default Re: Master Password

    Hey thanks a lot. I changed it to "customer account" and just got rid of the need for the apostrophe altogether. When I get a bit better at debugging code I will see stuff like that.
    Thanks!
    Give us your best shot!
    http://www.photoimprints.com

  6. #6
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Master Password

    In the downloads section there is a link to the download archives.

    master password is in the archives in the admin folder
    Zen cart PCI compliant Hosting

  7. #7
    Join Date
    Feb 2006
    Posts
    326
    Plugin Contributions
    0

    Default Re: Master Password

    Yes, I downloaded it from one of the threads, and the code error was in the download.
    Give us your best shot!
    http://www.photoimprints.com

  8. #8
    Join Date
    Feb 2006
    Posts
    326
    Plugin Contributions
    0

    Default Re: Master Password

    Hey thanks a lot. I changed it to "customer account" and just got rid of the need for the apostrophe altogether. When I get a bit better at debugging code I will see stuff like that.
    Thanks!
    Give us your best shot!
    http://www.photoimprints.com

  9. #9
    Join Date
    Jun 2006
    Location
    Oz
    Posts
    31
    Plugin Contributions
    0

    Default Re: Master Password

    I have installed this on my zenCart 1.3.0.2 and it works flawlessly.

    Only thing I must say is that the master password is in plain view on the admin screen. A little bit of a worry!
    Anyway...I will work on hideing it I think.

    Nice, simple contrib

  10. #10
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Master Password

    there is another contribution that encrypts the password
    Zen cart PCI compliant Hosting

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Master Password
    By Isaac2 in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 22 Nov 2010, 07:26 PM
  2. Master Password vs Encrypted Master Password
    By srturner47 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Apr 2008, 04:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR