Fix the parentheses and also make sure it does not contain a path.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/web/Submit.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index 2a4521edc..757efd1f5 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -476,12 +476,13 @@ sub Validate($) elsif ($self->{Page} == 3 && $self->GetParam("Page") == 3) { if (($self->GetParam("FileType") eq "patchdlls" && - ! ($self->GetParam("TestExecutable") =~ m/^[\w_.]+_test.exe/)) || - ($self->GetParam("FileType") eq "patchprograms") && - ! ($self->GetParam("TestExecutable") =~ m/^[\w_.]+.exe_test.exe/)) + $self->GetParam("TestExecutable") !~ m/^[\w_.]+_test.exe$/) || + ($self->GetParam("FileType") eq "patchprograms" && + $self->GetParam("TestExecutable") !~ m/^[\w_.]+.exe_test.exe$/) || + ($self->GetParam("TestExecutable") =~ m=(?:[a-z]:|[/\])=i)) { - $self->{ErrMessage} = "Invalid name for Test executable"; $self->{ErrField} = "TestExecutable"; + $self->{ErrMessage} = "Invalid test executable filename"; return !1; }