Subject: | AUTH LOGIN problem with LONG passwords encoding to more than 76 characters |
Date: | Sat, 7 Oct 2017 11:13:54 -0400 |
To: | bug-Mail-Sendmail [...] rt.cpan.org |
From: | Scott Preston <prests [...] gmail.com> |
Found due to login not working on a host;. The password they provided was
VERY long (69 characters) and encoded in base64 longer than 76 characters
(92 characters).
Using the awesome debug=6 option I found that it was breaking the password
into
2 rows.
Fixed Sendmail.pm AUTH LOGIN section line 446:
socket_write(encode_base64($auth->{password},$CRLF))
to
socket_write(encode_base64($auth->{password},'').$CRLF) # LONG
ENCODED PASSWORDS WERE RAPPING AT 76 CHARS
This issue likely exists in any encode_base64 line that can be longer.than
76 characters encoded
socket_write(encode_base64($auth->{user},$CRLF))
socket_write(
"AUTH PLAIN "
. encode_base64(join("\0", $auth->{user},
$auth->{user}, $auth->{password}), $CRLF)
socket_write(encode_base64("$auth->{user} $response", $CRLF))
socket_write(encode_base64($response, ""), $CRLF)
Hope this helps out.
Scott