diff options
author | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-04-24 13:28:25 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@omgwallhack.org> | 2011-04-24 13:28:25 -0700 |
commit | 4d19e0af572486ff0cd38b365dfc7411a8207837 (patch) | |
tree | a95b2febbba5a76dedd3ffc421b8f49d36193fa1 /pinyweb | |
parent | ffab3ec34b9fd949a9877d0a19182b58911424da (diff) | |
download | piny-code-4d19e0af572486ff0cd38b365dfc7411a8207837.tar.gz piny-code-4d19e0af572486ff0cd38b365dfc7411a8207837.zip |
Adding new <32 character limit to usernames
Diffstat (limited to 'pinyweb')
-rw-r--r-- | pinyweb/suid/piny-suid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pinyweb/suid/piny-suid.c b/pinyweb/suid/piny-suid.c index 0fbaddb..40c497f 100644 --- a/pinyweb/suid/piny-suid.c +++ b/pinyweb/suid/piny-suid.c @@ -22,7 +22,7 @@ int main( int argc, char *argv[] ) { regex_t user_reg; // Please note that these regular expressions should duplicate the language for usernames described in Piny::User. - if ( ( err = regcomp( &user_reg, "^[a-zA-Z][a-zA-Z0-9_.-]*$", REG_EXTENDED | REG_NOSUB ) ) != 0 ) { + if ( ( err = regcomp( &user_reg, "^[a-zA-Z][a-zA-Z0-9_.-]{0,30}$", REG_EXTENDED | REG_NOSUB ) ) != 0 ) { size_t sz = regerror( err, &user_reg, NULL, 0 ); char buf[sz]; regerror( err, &user_reg, buf, sz ); |