Bad customFunctions test (Closes: #938)

This commit is contained in:
Xavier Guimard 2016-02-17 16:38:10 +00:00
parent f4ed479a1c
commit 45dfd72b0b
2 changed files with 2 additions and 6 deletions

View File

@ -682,7 +682,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'customFunctions' => {
'msgFail' => '__badCustomFuncName__',
'test' => qr/^(?:\w+(?:\s+\w+)*)?$/,
'test' => qr/^(?:\w+(?:::\w+)*(?:\s+\w+(?:::\w+)*)*)?$/,
'type' => 'text'
},
'dbiAuthChain' => {
@ -1095,8 +1095,6 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
)
)
{
return 0, "__badCustomFuncName__ $f"
unless $f =~ /^[a-zA-Z]\w*$/;
$s = "sub $f {1} $s";
}
eval $s;

View File

@ -225,7 +225,7 @@ sub attributes {
},
customFunctions => {
type => 'text',
test => qr/^(?:\w+(?:\s+\w+)*)?$/,
test => qr/^(?:\w+(?:::\w+)*(?:\s+\w+(?:::\w+)*)*)?$/,
msgFail => "__badCustomFuncName__",
documentation => 'List of custom functions'
},
@ -900,8 +900,6 @@ sub attributes {
)
)
{
return ( 0, "__badCustomFuncName__ $f" )
unless ( $f =~ /^[a-zA-Z]\w*$/ );
$s = "sub $f {1} $s";
}
eval $s;