X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ce399941039778944bc5bc8d10c5f3603089af30..d6e1f1700c2ebb3a357885d78c8f76ab6bbe3dac:/sbr/mf.c diff --git a/sbr/mf.c b/sbr/mf.c index 6adbba72..136f94cd 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -65,7 +65,7 @@ isat (const char *p) * getadrx() implements a partial 822-style address parser. The parser * is neither complete nor correct. It does however recognize nearly all * of the 822 address syntax. In addition it handles the majority of the - * 733 syntax as well. Most problems arise from trying to accomodate both. + * 733 syntax as well. Most problems arise from trying to accommodate both. * * In terms of 822, the route-specification in * @@ -174,8 +174,9 @@ static char adr[BUFSIZ]; static struct adrx adrxs2; +/* eai = Email Address Internationalization */ struct adrx * -getadrx (const char *addrs) +getadrx (const char *addrs, int eai) { register char *bp; register struct adrx *adrxp = &adrxs2; @@ -230,6 +231,17 @@ getadrx (const char *addrs) break; } + if (! eai) { + /* + * Reject the address if key fields contain 8bit characters + */ + + if (contains8bit(mbox, NULL) || contains8bit(host, NULL) || + contains8bit(path, NULL) || contains8bit(grp, NULL)) { + strcpy(err, "Address contains 8-bit characters"); + } + } + if (err[0]) for (;;) { switch (last_lex) {