Change your *catalog*/includes/functions/password_funcs.php

Chemo <[email protected]>
Newsgroups gmane.comp.web.oscommerce.features
Message-ID <329db0245eaab46046b3f8b04b08aff7@osCommerce-Forums>
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=172829#172829
----------------------------------------------------------------

Change your *catalog*/includes/functions/password_funcs.php file to:
[code]<?php 
  function tep_validate_password($plain, $encrypted) { 
  
    global $HTTP_COOKIE_VARS; 
    
    if (tep_not_null($plain) && tep_not_null($encrypted)) { 

// split apart the hash / salt 
      $stack = explode(':', $encrypted); 

      if (sizeof($stack) != 2) return false; 

      if (md5($stack[1] . $plain) == $stack[0]) { 
        return true; 
      } 
    } 
   if (tep_not_null($HTTP_COOKIE_VARS['password']) && tep_not_null($encrypted)) {   //Autologon 
      if ($HTTP_COOKIE_VARS['password'] == $encrypted) { 
       return true; 
      }      
   } 
    return false; 
  } 

// This function makes a new password from a plaintext password. 
  function tep_encrypt_password($plain) { 
    $password = ''; 

    for ($i=0; $i<10; $i++) { 
      $password .= tep_rand(); 
    }
	} 
?>[/code]
The original function was called "validate_password()" and the autologon one is called "tep_validate_password()".

Chemo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.