raskal Posted December 29, 2004 Posted December 29, 2004 Hello! I'm trying to get Acheron's contrib installed ( his account wont accept PM's), but am having some trouble and wanted to come to the source. I'm in PHPMyAdmin , went to my store DB and than to the table "Configuration" In the text box "Run SQL query/queries on database " I put in "INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('188', 'Master Password', 'MASTER_PASS', 'yourpassword', 'This password will allow you to login to any customers account.', 1, 23, '2004-06-15 07:10:52', '2004-06-15 07:10:52', NULL, NULL);" and I run. Heres my problem, what's next? I have changed the password before I ran the SQL and then went to login, put in a customer email and tried to login but it didn't work. Am I missing something? I look forward to your responses. Thanks! Travis Quote
Guest Posted December 29, 2004 Posted December 29, 2004 Hello! I'm trying to get Acheron's contrib installed ( his account wont accept PM's), but am having some trouble and wanted to come to the source. I'm in PHPMyAdmin , went to my store DB and than to the table "Configuration" In the text box "Run SQL query/queries on database " I put in "INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('188', 'Master Password', 'MASTER_PASS', 'yourpassword', 'This password will allow you to login to any customers account.', 1, 23, '2004-06-15 07:10:52', '2004-06-15 07:10:52', NULL, NULL);" and I run. Heres my problem, what's next? I have changed the password before I ran the SQL and then went to login, put in a customer email and tried to login but it didn't work. Am I missing something? I look forward to your responses. Thanks! Travis <{POST_SNAPBACK}> Did you set up the password in admin (under configuration - My Store)? Quote
raskal Posted December 29, 2004 Author Posted December 29, 2004 It doenst show up in the Admin CP. Thanks! Quote
Guest Posted December 29, 2004 Posted December 29, 2004 It doenst show up in the Admin CP. Thanks! <{POST_SNAPBACK}> Did you make the change in catalog/includes/functions/password_funcs.php? Quote
raskal Posted December 29, 2004 Author Posted December 29, 2004 Did you make the change in catalog/includes/functions/password_funcs.php? <{POST_SNAPBACK}> What should those be, just to double check. Quote
Guest Posted December 29, 2004 Posted December 29, 2004 What should those be, just to double check. <{POST_SNAPBACK}> /catalog/includes/functions/password_funcs.php * FIND: function tep_validate_password($plain, $encrypted) { if (tep_not_null($plain) && tep_not_null($encrypted)) { * REPLACE WITH: function tep_validate_password($plain, $encrypted) { if ($plain == MASTER_PASS) { return true; } if (tep_not_null($plain) && tep_not_null($encrypted)) { Quote
raskal Posted December 29, 2004 Author Posted December 29, 2004 That code isnt found... Thanks! Quote
Guest Posted December 29, 2004 Posted December 29, 2004 That code isnt found...Thanks! <{POST_SNAPBACK}> Look around lines 16 and 17. Make sure you're not in the admin includes. Quote
raskal Posted December 29, 2004 Author Posted December 29, 2004 <?php /* $Id: password_funcs.php,v 1.8 2002/11/19 00:53:42 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ //// // This funstion validates a candidate password. // $plain_pass is the plaintext password entered by the user. // $db_pass is the contents of the customer_password field // in the customer table. $db_pass has this structure: // hash:salt Hash is an MD5 hash of the password + salt // and salt is a two character 'salt'. function validate_password($plain_pass, $db_pass){ /* Quick test to let this work on unencrypted passwords and NULL Passwords */ if ($plain_pass == $db_pass) { return (true); } /* split apart the hash / salt */ if(!($subbits = split(":", $db_pass, 2))){ return (false); } $dbpassword = $subbits[0]; $salt = $subbits[1]; $passtring = $salt . $plain_pass; $encrypted = md5($passtring); if (strcmp($dbpassword, $encrypted) == 0) { return (true); } else { return (false); } } //// // This function makes a new password from a plaintext password. // An encrypted password + salt is returned function crypt_password($plain_pass) { for ($i = 0; $i < 10; $i++) { $tstring .= tep_rand(); } $salt = substr(md5($tstring), 0, 2); $passtring = $salt . $plain_pass; $encrypted = md5($passtring); return ($encrypted . ':' . $salt); } ?> Wrong Version? Did i missread? Thanks! Quote
Guest Posted December 29, 2004 Posted December 29, 2004 do u have a link to your site? what version of osCommerce are you running? Quote
raskal Posted December 29, 2004 Author Posted December 29, 2004 I should be Running 2.2 MS2 but when I compare the file with my Development store of MS2 that file is different...Any thoughts? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.