Skip to content

Commit 5437cb3

Browse files
committed
fix: RCE
1 parent 9225922 commit 5437cb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/LogReaderControllerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function tail()
5454
{
5555
$this->checkIsEnable();
5656
$file = $this->getPathFromRequest();
57-
$line = $this->getRequest()->get('line', $this->getLogReader()->getTailDefaultLine());
57+
$line = (int)$this->getRequest()->get('line', $this->getLogReader()->getTailDefaultLine());
5858
$result = shell_exec("tail -n {$line} {$file}");
5959

6060
return new Response($result, 200, [

0 commit comments

Comments
 (0)