Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
64) {
$key = pack("H*",md5($key));
}
$k_ipad = $key ^ str_repeat(chr(0x36), 64) ;
$k_opad = $key ^ str_repeat(chr(0x5c), 64) ;
/* Heh, let's get recursive. */
$hmac=hmac_md5($k_opad . pack("H*",md5($k_ipad . $data)) );
return $hmac;
}
/**
* Reads and decodes stored user password information
*
* Direct access to password information is deprecated.
* @return string password in plain text
* @since 1.4.11
*/
function sqauth_read_password() {
sqgetGlobalVar('key', $key, SQ_COOKIE);
sqgetGlobalVar('onetimepad', $onetimepad,SQ_SESSION);
return OneTimePadDecrypt($key, $onetimepad);
}
/**
* Saves or updates user password information
*
* This function is used to update the password information that
* SquirrelMail stores in the existing PHP session. It does NOT
* modify the password stored in the authentication system used
* by the IMAP server.
*
* This function must be called before any html output is started.
* Direct access to password information is deprecated. The saved
* password information is available only to the SquirrelMail script
* that is called/executed AFTER the current one. If your script
* needs access to the saved password after a sqauth_save_password()
* call, use the returned OTP encrypted key.
*
* @param string $pass password
*
* @return string Password encrypted with OTP. In case the script
* wants to access the password information before
* the end of its execution.
*
* @since 1.4.16
*
*/
function sqauth_save_password($pass) {
sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
$onetimepad = OneTimePadCreate(strlen($pass));
sqsession_register($onetimepad,'onetimepad');
$key = OneTimePadEncrypt($pass, $onetimepad);
sqsetcookie('key', $key, false, $base_uri);
return $key;
}
/**
* Fillin user and password based on SMTP auth settings.
*
* @param string $user Reference to SMTP username
* @param string $pass Reference to SMTP password (unencrypted)
* @since 1.4.11
*/
function get_smtp_user(&$user, &$pass) {
global $username, $smtp_auth_mech,
$smtp_sitewide_user, $smtp_sitewide_pass;
if ($smtp_auth_mech == 'none') {
$user = '';
$pass = '';
} elseif ( isset($smtp_sitewide_user) && isset($smtp_sitewide_pass) &&
!empty($smtp_sitewide_user)) {
$user = $smtp_sitewide_user;
$pass = $smtp_sitewide_pass;
} else {
$user = $username;
$pass = sqauth_read_password();
}
// plugin authors note: override $user or $pass by
// returning an array where the new username is the
// first array value and the new password is the
// second array value e.g., return array($myuser, $mypass);
//
$ret = do_hook_function('smtp_auth', array($user, $pass));
if (!empty($ret[0]))
$user = $ret[0];
if (!empty($ret[1]))
$pass = $ret[1];
}