X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fauth.php;h=53b96d9f717e27ee90ef326bc99bb62dfe9fa452;hb=c91b2e3b5b2b35ab39b7c44bc866318b7341f7a1;hp=5b3f31e5e6b3f32b09fde2c360f3de135fc358bb;hpb=2ba138034e8cf69a80201035e0abdb51af93083d;p=squirrelmail.git diff --git a/functions/auth.php b/functions/auth.php index 5b3f31e5..53b96d9f 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -1,34 +1,292 @@ 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; +} - displayHtmlHeader( 'SquirrelMail', '', FALSE ); +/** + * 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" . - '