savannah-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers] savannah login name restriction


From: Mark H. Weaver
Subject: [Savannah-hackers] savannah login name restriction
Date: 09 Mar 2001 17:25:04 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.97

I just tried to help 3diff get registered on savannah, but he got a
mysterious error message:

    There must be at least one character.

The code which generates this error message is line 61 of
savannah/www/include/account.php, which does checks on the login name:

  // must have at least one character
  if (strspn($name,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") == 
0) {
        $GLOBALS['register_error'] = "There must be at least one character.";
        return 0;
  }

In fact, this is checking that the first character is a letter.  It
allows letters, digits, dashes, and underscores for the rest of the
characters.  I think we should allow digits for the first character.
The only reason computer languages don't typically allow this is so
they can tell the difference between an identifier and a numeric
constant.

Furthermore, I think the error message should be changed to:

    The first character of your login name must be alphanumeric.

I would've changed this myself, but I don't know how to install
changes once they are made.  Could someone please explain the process
to me?

        Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]