🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82030

White spaces in usernames/passwords (AUTHINFO)

#82030
From: Julien ÉLIE
Date: Tue, 20 Oct 2009 18:45
62 lines
3479 bytes
Hi all,

* Do you know news servers that accept white spaces in usernames
and passwords?  If yes, do they accept leading and trailing spaces
in usernames and passwords?

* And do you know readers that *wrongly* add leading or trailing
spaces in the commands they send to news servers?
(in which case, parsing will not be properly done by servers)


We're going to implement the support of white spaces in usernames
and passwords in INN 2.5.2 for AUTHINFO USER/PASS (note that
AUTHINFO SASL is already supported by INN 2.5.0).  But we want
to be sure something will not break somewhere...

Thanks for your help!


Example:

"AUTHINFO USER  test"
"AUTHINFO PASS test "
will be for user " test", with password "test ".



According to RFC 4643:

   Note that a server MAY (but is not required to) allow white space
   characters in usernames and passwords.  A server implementation MAY
   blindly split command arguments at white space and therefore may not
   preserve the exact sequence of white space characters in the username
   or password.  Therefore, a client SHOULD scan the username and
   password for white space and, if any is detected, warn the user of
   the likelihood of problems.  The SASL PLAIN [PLAIN] mechanism is
   recommended as an alternative, as it does not suffer from these
   issues.

[...]

   NOTE: a server implementation MAY parse AUTHINFO USER and AUTHINFO
   PASS specially so as to allow white space to be used within the
   username or password.  Such implementations accept the additional
   syntax (making these two items inconsistent with "token" in Section
   9.8 of [NNTP]):

   user-pass-char =/ SP / TAB

   In doing so, the grammar can become ambiguous if the username or
   password begins or ends with white space.  To solve this ambiguity,
   such implementations typically treat everything after the first white
   space character following "USER"/"PASS", up to, but not including,
   the CRLF, as the username/password.

-- 
Julien ÉLIE

« Cinq millions et demi de conducteurs français
  ont une mauvaise vue. Heureusement, leur nombre diminue
  de jour en jour. » (Coluche) 
Technical Details
Message-ID: <hbl0hd$ane$1@news.trigofacile.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.20141118.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder2.news.weretis.net!news.trigofacile.com!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <hbl0hd$ane$1@news.trigofacile.com>
Subject: White spaces in usernames/passwords (AUTHINFO)
Date: Tue, 20 Oct 2009 20:45:59 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder2.news.weretis.net!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp,news.software.readers
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 62
NNTP-Posting-Host: aaubervilliers-151-1-27-37.w83-112.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="ISO-8859-15";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1256064365 10990 83.112.18.37 (20 Oct 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Tue, 20 Oct 2009 18:46:05 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
X-Original-Bytes: 3292