Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 31 Dec 2002 20:52:37 +0300
From: Solar Designer <solar@...nwall.com>
To: popa3d-users@...ts.openwall.com
Subject: Re: '.' and '/' in usernames

On Tue, Dec 31, 2002 at 06:07:26PM +0100, Tim van Erven wrote:
> Popa3d rejects usernames with dots ('.') in them and I believe it also
> rejects usernames containing any slashes ('/'), though I haven't tested
> the latter.

No, it doesn't.  The code you're referring to is only an example of
setting up virtual domains.  It's not used for Unix accounts, and
actual virtual domain setups may use different user database formats,
possibly without such restrictions.

> AFAICT, rfc 1939 allows usernames consisting of any printable ASCII
> characters (and being no longer than 40 characters). Surely '.' and '/'
> are printable characters.

That's true, but it doesn't mean that a POP3 server (setup) which
disallows these characters isn't RFC-compliant.  The RFC doesn't
require that it's possible for a server admin to create such
usernames, it merely specifies that such usernames may be passed over
the POP3 protocol.

> Fixing this might not be worth the additional complexity and room for
> errors, but perhaps a note in the DESIGN file is in order?

In VIRTUAL, maybe.  But first this "virtual" stuff would need to be
documented.

> For your reference from virtual.c:
> 
> static int is_valid_user(char *user)
> {
>         unsigned char *p;
> 
> /* This is pretty liberal, but we're going to use direct syscalls only,
>  * and they have to accept all the printable characters */
>         for (p = (unsigned char *)user; *p; p++)
>                 if (*p < ' ' || *p > 0x7E || *p == '.' || *p == '/') return 0;
> 
>         if (p - (unsigned char *)user > NAME_MAX) return 0;
> 
>         return 1;
> }

-- 
/sd

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.