Skip to content
Permalink
Browse files

Item12180: Cleanup logging of authentication failures.

git-svn-id: http://svn.foswiki.org/trunk@16278 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
TimotheLitt TimotheLitt
TimotheLitt authored and TimotheLitt committed Dec 26, 2012
1 parent 14c238d commit 09c9afc4915400926ab8a0954633d0f2823c4665
Showing with 6 additions and 7 deletions.
  1. +6 −7 core/lib/Foswiki/Net.pm
@@ -893,7 +893,7 @@ s/([\n\r])(From|To|CC|BCC)(\:\s*)([^\n\r]*)/$1 . $2 . $3 . _fixLineLength( $4 )/
"Failed to send mail to "
. join( ', ', @to )
. " using $this->{MAIL_METHOD}.\n";
$this->_logMailError( 'die', $mess . $code . '-' . $msg );
$this->_logMailError( 'die', $mess . $code . ' ' . $msg );
}
}

@@ -985,12 +985,11 @@ sub authenticateCx {
local $inAuth = 1;
unless ( $smtp->auth( $username, $password ) ) {
$inAuth = 0;
$smtp->quit();
$this->_logMailError( 'error',
'Authentication failed: '
. $smtp->code() . '-'
"Authentication failed:\n"
. $smtp->code() . ' '
. $smtp->message()
. ".\nVerify that the configured username and password are valid for $host"
. "Verify that the configured username and password are valid for $host"
);
return 0;
}
@@ -1296,7 +1295,7 @@ sub startTLS {
$this->_logMailError(
'die',
"$host did not accept STARTTLS: ",
$code . '-' . $msg
$code . ' ' . $msg
);
}

@@ -1330,7 +1329,7 @@ sub startTLS {
$this->_logMailError(
'die',
"$host rejected HELLO after STARTTLS: ",
$code . '-' . $msg
$code . ' ' . $msg
);
}
return;

0 comments on commit 09c9afc

Please sign in to comment.
You can’t perform that action at this time.