Article View: news.software.nntp
Article #55564Re: Is there a hack to support paswords that contain spaces?
From: Aidan Cully
Date: Sun, 09 Dec 2001 13:44
Date: Sun, 09 Dec 2001 13:44
32 lines
2456 bytes
2456 bytes
In news.software.nntp, Russ Allbery <rra@stanford.edu> wrote: > Jeffrey M Vinocur <jeff@litech.org> writes: > > > Oh wait. Implementing this for nnrpd could be a bit hairy... > > Heh. Yes. That's why it's not been fixed. > > I think we have to do one of these: > > > - change the prototype of everything in nnrpd/commands.c to also > > take the original buffer as input; this is pretty awful > > > - change Argify to special case for authinfo and ignore > > whitespace after the password begins; this is *really* awful > > The right thing to do is probably to pass every function both the raw > command line and the Argify'd command line in case it needs the raw one; > that way nothing has to be special-cased but there isn't massive code > duplication. Still kind of ugly, though. How about: only parse the command to select the command function, and pass two strings to the command function (argv[0], and a pointer to the first non-whitespace character afterwards, or the trailing '\0'). Now the command function is responsible for calling Argify. In the case of AUTHINFO, it just wouldn't. Won't passing both versiouns of the command line require data duplication, because Argify() overwrites some of the input string with nulls? --aidan
Technical Details
Message-ID:
<9uvprf$afl$1@news.panix.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!nycmny1-snh1.gtei.net!news.gtei.net!panix!news.panix.com!not-for-mailReferences:
<9urfpi$7vi$1@teta.doit.wisc.edu> <ylg06l5r1p.fsf@windlord.stanford.edu> <9uuko7$br8$1@marduk.litech.org> <ylzo4t2fci.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <9uvprf$afl$1@news.panix.com> Subject: Re: Is there a hack to support paswords that contain spaces? Date: Sun, 09 Dec 2001 13:44:15 +0000 From: aidan@panix.com (Aidan Cully) References: <9urfpi$7vi$1@teta.doit.wisc.edu> <ylg06l5r1p.fsf@windlord.stanford.edu> <9uuko7$br8$1@marduk.litech.org> <ylzo4t2fci.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!nycmny1-snh1.gtei.net!news.gtei.net!panix!news.panix.com!not-for-mail Newsgroups: news.software.nntp Organization: Public Access Networks Corp. Lines: 31 Distribution: inet NNTP-Posting-Host: panix2.panix.com X-Trace: news.panix.com 1007905455 10741 166.84.1.2 (9 Dec 2001 13:44:15 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: 9 Dec 2001 13:44:15 GMT X-Newsreader: trn 4.0-test74 (May 26, 2000) Originator: aidan@panix.com (Aidan Cully)