From: Moritz Bunkus Date: Thu, 4 Feb 2010 14:44:11 +0000 (+0100) Subject: Modul- und Funktionsnamen müssen mit einem Buchstaben beginnen X-Git-Tag: release-2.6.2beta1~297 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d8b7e4d092f7c48c3caac6106de4837390fe6323;p=kivitendo-erp.git Modul- und Funktionsnamen müssen mit einem Buchstaben beginnen --- diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 76d49b5f8..3b64e48c3 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -206,18 +206,18 @@ sub _route_request { } sub _route_dispatcher_request { - my $action_re = '[a-z0-9_\-]+'; + my $name_re = qr{[a-z]\w*}; my ($script_name, $action); eval { - die "Unroutable request -- inavlid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^$action_re$/); + die "Unroutable request -- inavlid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^${name_re}$/); $script_name = $::form->{M} . '.pl'; if ($::form->{A}) { $action = $::form->{A}; } else { - $action = first { m/^A_${action_re}$/ } keys %{ $::form }; + $action = first { m/^A_${name_re}$/ } keys %{ $::form }; die "Unroutable request -- inavlid action name.\n" if !$action; delete $::form->{$action};