[PATCH] testbot/web: Use IsValidFileName() to validate executable filenames.
Francois Gouget
fgouget at codeweavers.com
Tue Jul 10 03:33:22 CDT 2018
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>
---
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 38aa75fcb..cb6a1246f 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";
--
2.18.0
More information about the wine-devel
mailing list