summaryrefslogtreecommitdiff
path: root/pinyweb/suid/piny-suid.c
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2011-04-24 13:28:25 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2011-04-24 13:28:25 -0700
commit4d19e0af572486ff0cd38b365dfc7411a8207837 (patch)
treea95b2febbba5a76dedd3ffc421b8f49d36193fa1 /pinyweb/suid/piny-suid.c
parentffab3ec34b9fd949a9877d0a19182b58911424da (diff)
downloadpiny-code-4d19e0af572486ff0cd38b365dfc7411a8207837.tar.gz
piny-code-4d19e0af572486ff0cd38b365dfc7411a8207837.zip
Adding new <32 character limit to usernames
Diffstat (limited to 'pinyweb/suid/piny-suid.c')
-rw-r--r--pinyweb/suid/piny-suid.c2
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 );