From 4d19e0af572486ff0cd38b365dfc7411a8207837 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Sun, 24 Apr 2011 13:28:25 -0700 Subject: Adding new <32 character limit to usernames --- pinyweb/suid/piny-suid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pinyweb') 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 ); -- cgit v1.2.3