diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2010-03-18 13:52:05 -0700 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2010-03-18 13:52:05 -0700 |
commit | 311d67a43ba7958c327d60a13e040a51cbb94139 (patch) | |
tree | 92f3d853180d8653f42dbf3b99be17b7b9e2dbb4 /usr | |
parent | a02d7015f4c45c782d81c526a068cde73fc7bf8f (diff) | |
download | piny-code-311d67a43ba7958c327d60a13e040a51cbb94139.tar.gz piny-code-311d67a43ba7958c327d60a13e040a51cbb94139.zip |
More constraint stuff in libpiny.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/libpiny/debian/changelog | 3 | ||||
-rw-r--r-- | usr/src/libpiny/lib/Piny/User.pm | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/libpiny/debian/changelog b/usr/src/libpiny/debian/changelog index f7d4449..bd74a64 100644 --- a/usr/src/libpiny/debian/changelog +++ b/usr/src/libpiny/debian/changelog @@ -4,8 +4,9 @@ libpiny-perl (0.3-1) unstable; urgency=low * Add group membership manipulation. * Add some more type constraints. * Fix a bug in the username detection. + * Forbid purely-numeric usernames. - -- Julian Blake Kongslie <jblake@omgwallhack.org> Thu, 18 Mar 2010 13:45:52 -0700 + -- Julian Blake Kongslie <jblake@omgwallhack.org> Thu, 18 Mar 2010 13:51:47 -0700 libpiny-perl (0.2-1) unstable; urgency=low diff --git a/usr/src/libpiny/lib/Piny/User.pm b/usr/src/libpiny/lib/Piny/User.pm index e4b865c..e0687a3 100644 --- a/usr/src/libpiny/lib/Piny/User.pm +++ b/usr/src/libpiny/lib/Piny/User.pm @@ -13,7 +13,7 @@ use Piny::Group; subtype 'Username' => as 'Str' - => where { $_ =~ /^(?!(git|ikiwiki)-)[[a-zA-Z0-9][a-zA-Z0-9_.-]*$/ } + => where { $_ =~ /^(?!(git|ikiwiki)-)[[a-zA-Z][a-zA-Z0-9_.-]*$/ } => message { 'That username is not in the correct format for a piny user.' } ; |