🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #55565

Re: Is there a hack to support paswords that contain spaces?

#55565
From: Jeffrey M. Vinocur
Date: Sun, 09 Dec 2001 16:31
39 lines
2557 bytes
In article <slrna16ao4.23i3.andrew+nonews@trinity.supernews.net>,
Andrew - Supernews <andrew@supernews.com> wrote:
>
>You'll find that this is a pain, because you've probably argified the
>original command line in place by nulling out the whitespace.

Nope.  We're nulling out a copy.


>What I actually do (though I've not actually set this up for AUTHINFO PASS,
>mainly because it's never seemed to be an issue before) is have a flag
>in the command table which says whether the command needs to be argified;
>if not, I just pass the whole argument string as argv[1].

The trouble is almost everything, including CMDauthinfo, needs
the argified version (as well).


>Perhaps an even better solution would be to use a number instead of that
>flag, giving the number of words to argify, with any remaining text left
>as the last argument.

Hmm.  That's not bad.  We could still have argify scan the whole
string and return the count of the total number of arguments,
which allows error checking for too few/many.  

I've been wrestling with how, if you get the original buffer
passed in as well, you can find the beginning of everything-else
without running over the string again (which is just yuck).  If
we were sure there was never leading whitespace in the original
buffer, buff[av[i] - av[0]] would do it, which isn't half bad.

But I like your idea better.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <9v03li$bq6$1@marduk.litech.org>
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.ems.psu.edu!news.litech.org!not-for-mail
References: <9urfpi$7vi$1@teta.doit.wisc.edu> <9uuko7$br8$1@marduk.litech.org> <ylzo4t2fci.fsf@windlord.stanford.edu> <slrna16ao4.23i3.andrew+nonews@trinity.supernews.net>

Show Full Headers
Complete Article Headers
Message-ID: <9v03li$bq6$1@marduk.litech.org>
Subject: Re: Is there a hack to support paswords that contain spaces?
Date: Sun, 09 Dec 2001 16:31:46 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <9urfpi$7vi$1@teta.doit.wisc.edu> <9uuko7$br8$1@marduk.litech.org> <ylzo4t2fci.fsf@windlord.stanford.edu> <slrna16ao4.23i3.andrew+nonews@trinity.supernews.net>
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.ems.psu.edu!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Lithium Technologies
Lines: 38
Sender: jeff@litech.org
NNTP-Posting-Host: marduk.litech.org
X-Trace: marduk.litech.org 1007915506 12102 128.84.154.54 (9 Dec 2001 16:31:46 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Sun, 9 Dec 2001 16:31:46 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)