X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fauth.php;h=befbf03f06b978b8d6671c8b44028d96cef0db32;hp=7dd58a7a14a636405097bdb2564d8dd452b64c39;hb=a53b1ba9fd9c3c2d144bf64599016b4b1087f94d;hpb=2d367c687f9813a45a3d2f1911036cfc0425fdd0 diff --git a/functions/auth.php b/functions/auth.php index 7dd58a7a..befbf03f 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -1,28 +1,374 @@ 64) + $key = pack("H*", md5($key)); + + $k_ipad = $key ^ str_repeat(chr(0x36), 64); + $k_opad = $key ^ str_repeat(chr(0x5c), 64); + + $hmac = hmac_md5($k_opad . pack('H*', md5($k_ipad . $data))); + + return $hmac; + +} - set_up_language($squirrelmail_language, true); +/** + * 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; - echo "
\n" . - '