[PATCH] testbot/web: Fix the Submit.pl TestExecutable validation.
Francois Gouget
fgouget at codeweavers.com
Fri Jun 1 02:19:41 CDT 2018
Fix the parentheses and also make sure it does not contain a path.
Signed-off-by: Francois Gouget <fgouget at 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;
}
--
2.17.0
More information about the wine-devel
mailing list