From: Simon Wright <simon@pushface.org>
Subject: Re: need a little string hint...
Date: 01 Mar 2005 21:25:53 +0000
Date: 2005-03-01T21:25:53+00:00 [thread overview]
Message-ID: <x7vsm3f6ota.fsf@smaug.pushface.org> (raw)
In-Reply-To: 422354fb$0$14965$ba620e4c@news.skynet.be
Adrien Plisson <aplisson-news@stochastique.net> writes:
> Andre wrote:
> > Trim (String, Both)
> > mferracini wrote:
> >
> >> mhh and how i can trim away the ' '?
> >>
>
> and what if the hostname contains a voluntary space at the end or at
> the beginning ?
>
> this may happen because the configuration file writer wanted spaces
> converted to "%20", or it may just happen because somebody mistyped
> the hostname in the configuration file.
>
> in any case, your solution prevent from taking the appropriate
> action since it removes the spaces... with all the security risks
> implied.
Of course you may not be talking about DNS -- but I'm pretty sure that
under DNS legal hostname characters are [a-z0-9.-] (case insensitive)
which doesn't include space.
A text-based config file format that includes significant whitespace
as you suggest and doesn't delimit it (eg, with quotes) is asking to
be derided. Just look at make(1).
--
Simon Wright 100% Ada, no bugs.
next prev parent reply other threads:[~2005-03-01 21:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-28 16:08 need a little string hint mferracini
2005-02-28 16:26 ` Adrien Plisson
2005-02-28 16:49 ` mferracini
2005-02-28 16:53 ` Andre
2005-02-28 17:29 ` Adrien Plisson
2005-03-01 21:25 ` Simon Wright [this message]
2005-03-01 22:29 ` Adrien Plisson
2005-03-03 6:19 ` Simon Wright
2005-02-28 17:49 ` Jeffrey Carter
2005-02-28 16:51 ` mferracini
2005-02-28 16:59 ` Adrien Plisson
2005-03-01 3:07 ` Steve
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox