Permalink
Browse files

Allow spaces in usernames (thanks to Juraj Hercek).

  • Loading branch information...
1 parent 1470309 commit 2a1369cedaf3a6c7d4b20d01e4deea02452cc4a4 @jgm committed Oct 29, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 Network/Gitit/Authentication.hs
@@ -264,7 +264,8 @@ sharedValidation :: ValidationType
-> Params
-> GititServerPart (Either [String] (String,String,String))
sharedValidation validationType params = do
- let isValidUsername u = length u >= 3 && all isAlphaNum u
+ let isValidUsernameChar c = isAlphaNum c || c == ' '
+ let isValidUsername u = length u >= 3 && all isValidUsernameChar u
let isValidPassword pw = length pw >= 6 && not (all isAlpha pw)
let accessCode = pAccessCode params
let uname = pUsername params

0 comments on commit 2a1369c

Please sign in to comment.