Module: tools Branch: master Commit: a3e19536e17e95a1e9c09963120c480126fd02d8 URL: https://source.winehq.org/git/tools.git/?a=commit;h=a3e19536e17e95a1e9c09963...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed Feb 5 13:56:47 2020 +0100
testbot/web: Fix the log / report name validation in GetTaskFile.pl.
Allow downloading task.log, testbot.log and their old versions. Also, dashes are not allowed in report names.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 6353219..4111119 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";