Joomla is storing a password inside a local cookie if the user checks the box 'remember me' when you login. This code then runs when a succesful login was made.
if (!in_array(false, $results, true))
{
// Set the remember me cookie if enabled.
if (isset($options['remember']) && $options['remember'])
{
// Create the encryption key, apply extra hardening using the user agent string.
$privateKey = self::getHash(@$_SERVER['HTTP_USER_AGENT']);
$key = new JCryptKey('simple', $privateKey, $privateKey);
$crypt = new JCrypt(new JCryptCipherSimple, $key);
$rcookie = $crypt->encrypt(serialize($credentials));
$lifetime = time() + 365 * 24 * 60 * 60;
// Use domain and path set in config for cookie if it exists.
$cookie_domain = $this->getCfg('cookie_domain', '');
$cookie_path = $this->getCfg('cookie_path', '/');
setcookie(self::getHash('JLOGIN_REMEMBER'), $rcookie, $lifetime, $cookie_path, $cookie_domain);
}
return true;
}
Note $credentials has a ['password'] key value and it does contain the password from the login form. So if this is encrypted then it must be 2 way for the system to reverse this and populate the password field from the cookie ?
My question is how can I do this..the real clear password is not saved on the users table but an MD5 hashed one. So it must be from this cookie that joomla is able to save the password.