[PATCH] testbot/web: Fix the log / report name validation in GetTaskFile.pl.
Francois Gouget
fgouget at codeweavers.com
Wed Feb 5 06:56:47 CST 2020
Allow downloading task.log, testbot.log and their old versions.
Also, dashes are not allowed in report names.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/web/GetTaskFile.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/web/GetTaskFile.pl b/testbot/web/GetTaskFile.pl
index 6353219e46..41111197df 100644
--- a/testbot/web/GetTaskFile.pl
+++ b/testbot/web/GetTaskFile.pl
@@ -37,7 +37,7 @@ sub SendTaskFile($$$$$)
$StepNo = $1;
return undef if ($TaskNo !~ m/^(\d+)$/);
$TaskNo = $1;
- return undef if ($File !~ m/^(log|[a-zA-Z0-9_-]+\.report)$/);
+ return undef if ($File !~ m/^((?:old_)?(?:task|testbot)\.log|[a-zA-Z0-9_]+\.report)$/);
$File = $1;
my $FileName = "$DataDir/jobs/$JobId/$StepNo/$TaskNo/$File";
--
2.20.1
More information about the wine-devel
mailing list