<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2107: bad IDN error message is not descriptive



The following reply was made to PR mutt/2107; it has been noted by GNATS.

From: Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: Mutt Developers <mutt-dev@xxxxxxxx>
Subject: Re: mutt/2107: bad IDN error message is not descriptive
Date: Mon, 31 Oct 2005 11:52:05 +0100

 On 2005-10-21 16:25:01 +0200, Alain Bench wrote:
 
 >  > I also suggest the e-mail to be resent anyway instead of this message
 >  > if it's technically possible.
 
 >      Well no: Even if it was possible, we don't want to send a badly
 >  formed mail. Some misconfiguration has to be fixed first.
 
 The underlying problem seems to be that the IDN code is a little too
 strict about addresses that look like "local@".  The patch below
 takes care of this by treating addresses like that like addresses
 that have no '@' in them, for the IDN code's purposes.
 
 --=20
 Thomas Roessler =B7 Personal soap box at <http://log.does-not-exist.org/>.
 
 
 
 
 
 
 diff -u -r3.12 mutt_idna.c
 --- mutt_idna.c        17 Sep 2005 20:46:10 -0000      3.12
 +++ mutt_idna.c        31 Oct 2005 10:50:27 -0000
 @@ -132,7 +132,7 @@
    *domain =3D NULL;
   =20
    p =3D strchr (mbx, '@');
 -  if (!p)
 +  if (!p || !p[1])
      return -1;
    *user =3D safe_calloc((p - mbx + 1), sizeof(mbx[0]));
    strfcpy (*user, mbx, (p - mbx + 1));