Francois Gouget : testbot/web: Use IsValidFileName() to validate executable filenames.
Alexandre Julliard
julliard at winehq.org
Tue Jul 10 12:39:41 CDT 2018
Module: tools
Branch: master
Commit: f9b8b65011eff1959436a851962f024e53bba193
URL: https://source.winehq.org/git/tools.git/?a=commit;h=f9b8b65011eff1959436a851962f024e53bba193
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Jul 10 10:33:22 2018 +0200
testbot/web: Use IsValidFileName() to validate executable filenames.
Submit.pl should not have its own way to check that the executable
filename is a valid Windows filename.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/Submit.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index 38aa75f..cb6a124 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -484,7 +484,7 @@ sub Validate($)
{
if (($self->GetParam("FileType") eq "patchdlls" &&
$self->GetParam("TestExecutable") !~ m/^[\w_.]+_test\.exe$/) ||
- ($self->GetParam("TestExecutable") =~ m=(?:[a-z]:|[/\\])=i))
+ !IsValidFileName($self->GetParam("TestExecutable")))
{
$self->{ErrField} = "TestExecutable";
$self->{ErrMessage} = "Invalid test executable filename";
More information about the wine-cvs
mailing list