From: David Presotto <presotto@closedmind.org>
To: miller@hamnavoe.demon.co.uk, 9fans@cse.psu.edu
Subject: Re: [9fans] factotum apop protocol is incorrect
Date: Fri, 12 Dec 2003 14:59:46 -0500 [thread overview]
Message-ID: <37dc31191ad95043011ccf18788b8dcd@plan9.bell-labs.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
I really dinna want to change %H. The logical thing there would be to
have a %h and a %H but little 'h' is already taken as a flag.
I'll just fix apop with your suggestion.
[-- Attachment #2: Type: message/rfc822, Size: 2775 bytes --]
From: Richard Miller <miller@hamnavoe.demon.co.uk>
To: 9fans@cse.psu.edu
Subject: [9fans] factotum apop protocol is incorrect
Date: Fri, 12 Dec 2003 19:47:35 0000
Message-ID: <b07c2ff1dcb618953620ac173286d274@hamnavoe.com>
RFC1939 introduces the 'APOP name digest' command for
challenge-response authentication to a POP3 mail server, and says:
"The digest parameter ... is sent in hexadecimal format, using
lower-case ASCII characters."
Factotum's proto=apop implementation encodes the digest as
upper-case hexadecimal.
Probably most POP3 servers can handle both, but I've just hit
an unforgiving one.
Possible fixes:
In /sys/src/cmd/auth/factotum/apop.c, replace
sprint(s->resp, "%.*H", MD5dlen, digest);
with something like
for(i=0; i<MD5dlen; i++)
sprint(&s->resp[2*i], "%.2x", digest[i]);
or in /sys/src/libc/port/u16.c, replace
static char t16e[] = "0123456789ABCDEF";
with
static char t16e[] = "0123456789abcdef";
The latter has a more widespread effect, but it arguably makes the %H
format conform to its documentation. The man page for print(2) makes
a distinction between "hexadecimal" and "upper case hexadecimal" for
%x and %X respectively. enc16(2) just says %H means "base 16 (i.e.
hexadecimal)", so one might expect it to be lower case.
-- Richard Miller
next reply other threads:[~2003-12-12 19:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-12 19:59 David Presotto [this message]
2003-12-13 2:42 ` Dan Cross
2003-12-13 2:47 ` Dan Cross
-- strict thread matches above, loose matches on Subject: below --
2003-12-13 3:55 David Presotto
2003-12-14 21:59 ` Dan Cross
2003-12-15 8:49 ` Fco.J.Ballesteros
2003-12-15 14:26 ` David Presotto
2003-12-12 19:47 Richard Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37dc31191ad95043011ccf18788b8dcd@plan9.bell-labs.com \
--to=presotto@closedmind.org \
--cc=9fans@cse.psu.edu \
--cc=miller@hamnavoe.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).