Francois Gouget : testbot/web: Use IsValidFileName() to validate executable filenames.
Module: tools Branch: master Commit: f9b8b65011eff1959436a851962f024e53bba193 URL: https://source.winehq.org/git/tools.git/?a=commit;h=f9b8b65011eff1959436a851... Author: Francois Gouget <fgouget(a)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(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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";
participants (1)
-
Alexandre Julliard