summaryrefslogtreecommitdiff
path: root/utils/rhrd-show
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-03-15 15:15:06 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-03-15 15:15:06 (GMT)
commit0a478276072229e91dfee0dc73ead900dbdbaa3f (patch)
treebae12caa9268c6d1194082fedc0d46c64184ae39 /utils/rhrd-show
parent47bf16cb97806bb1632e5933a1defee34b915b69 (diff)
removed worskstation login script
Diffstat (limited to 'utils/rhrd-show')
-rwxr-xr-xutils/rhrd-show10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/rhrd-show b/utils/rhrd-show
index 60a322c..8360c5c 100755
--- a/utils/rhrd-show
+++ b/utils/rhrd-show
@@ -72,7 +72,13 @@ sub show
sub add__check_arguments
{
- my ($name, $title, $num_carts, $rhythm, $dow, $starttime, $len) = @_;
+ my ($groupname, $name, $title, $num_carts, $rhythm, $dow, $starttime, $len) = @_;
+
+ if($groupname !~ m/^[-a-zA-Z0-9_]{1,10}$/) {
+ print STDERR "name '" . $groupname . "' contains illegal characters or is too long/short\n";
+ print STDERR " only a-z, A-Z, 0-9 and _,- are allowed and the length must be between 1 and 10\n";
+ return 1;
+ }
if($name !~ m/^[a-zA-Z0-9_]{1,10}$/) {
print STDERR "name '" . $name . "' contains illegal characters or is too long/short\n";
@@ -116,7 +122,7 @@ sub add
{
my ($ctx, $groupname, $name, $title, $num_carts, $rhythm, $dow, $starttime, $len) = @_;
- my $ret = add__check_arguments($name, $title, $num_carts, $rhythm, $dow, $starttime, $len);
+ my $ret = add__check_arguments($groupname, $name, $title, $num_carts, $rhythm, $dow, $starttime, $len);
if($ret) {
return $ret;
}