Join: usernames must be between two and twelve characters
authorClinton Ebadi <clinton@unknownlamer.org>
Tue, 25 Mar 2014 05:29:49 +0000 (01:29 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Tue, 25 Mar 2014 05:29:49 +0000 (01:29 -0400)
One character usernames would be cool, except for the whole
/afs/hcoop/net/user/a/ab thing

app/app.sml
app/join.mlt

index 12abe57..513fa94 100644 (file)
@@ -161,7 +161,7 @@ fun validDomain s =
 
 fun validUsername name =
     size name <= 12
-    andalso size name > 0
+    andalso size name >= 2
     andalso Char.isLower (String.sub (name, 0))
     andalso CharVector.all Char.isAlphaNum name
 
index 9019574..79a66fb 100644 (file)
@@ -58,8 +58,8 @@ else
 <input type="hidden" name="cmd" value="app">
 
 <table class="blanks">
-<tr> <td width="25%">Desired username:</td> <td width="75%"><input name="name" max="12" min="1" type="text" required="required"><br>
-       Please follow usual UNIX conventions, including limiting yourself to lowercase letters and at most 12 characters. It's helpful to pick a name you wouldn't mind using to identify yourself to both strangers and friends. Something based on your "real" name is a safe bet.<br>
+<tr> <td width="25%">Desired username:</td> <td width="75%"><input name="name" max="12" min="2" type="text" required="required"><br>
+       Please follow usual UNIX conventions, including limiting yourself to lowercase letters and between 2 and 12 characters. It's helpful to pick a name you wouldn't mind using to identify yourself to both strangers and friends. Something based on your "real" name is a safe bet.<br>
        You don't need to worry about whether or not the username you want is already taken. This application system will let you know if that is the case. You can probably use a shorter and simpler name than you are accustomed to getting at larger services, so we encourage you to try such names first.</td> </tr>
 <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr>
 <% if minor then %>