Inside imap_mailstorage_init_sasl_with_local_address,
imap_storage->imap_password was only initialized if the password
parameter was set. This meant that we would crash in
imap_mailstorage_uninitialize when attempting to free the
uninitialized value.
This return code corresponds to 480 "authentication failed", and like
all 4xx response codes it means that the command getting this answer
has not been performed.
NEWSNNTP_WARNING_REQUEST_AUTHORIZATION_USERNAME is deprecated but it
is kept for compatibility with the existing code base.
Ref.: http://tools.ietf.org/html/rfc977#section-2.4.2
Signed-off-by: Sébastien Bigaret <sebastien.bigaret@telecom-bretagne.eu>
Reporting 482 "authentication commands issued out of sequence" as
AUTHENTIFICATION REJECTED tricks clients into thinking that the
supplied credentials are invalid, while it is definitely not the case
(but rather, this is caused by a flaw in the client's logic).
AFAIK there is no adequate error for this in libetpan, hence the
introduction of a new error:
NEWSNNTP_ERROR_AUTHENTICATION_OUT_OF_SEQUENCE
It is mapped to MAIL_ERROR_BAD_STATE in nntpdriver-tools:
nntpdriver_nntp_error_to_mail_error() --not sure about this, but
included here so that it is not forgotten and it will be eventually
fixed in case the patch is accepted.
Signed-off-by: Sébastien Bigaret <sebastien.bigaret@telecom-bretagne.eu>