Francois Gouget : testbot/web: Fix the Submit.pl TestExecutable validation.

Alexandre Julliard julliard at winehq.org
Fri Jun 1 13:03:00 CDT 2018


Module: tools
Branch: master
Commit: f6a72a5e68c32db11246eae893211e10bae69aba
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=f6a72a5e68c32db11246eae893211e10bae69aba

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Jun  1 09:19:41 2018 +0200

testbot/web: Fix the Submit.pl TestExecutable validation.

Fix the parentheses and also make sure it does not contain a path.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 1cc2b98..ae69e7c 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;
     }
 




More information about the wine-cvs mailing list