From cda89c06dc5331d06fab863d7cb1c4047ad68357 Mon Sep 17 00:00:00 2001 From: rap2h Date: Wed, 7 Mar 2018 10:16:17 +0100 Subject: [PATCH] security fix --- src/controllers/LogViewerController.php | 6 +++--- src/views/log.blade.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/LogViewerController.php b/src/controllers/LogViewerController.php index c0aabff..acc673e 100644 --- a/src/controllers/LogViewerController.php +++ b/src/controllers/LogViewerController.php @@ -20,13 +20,13 @@ public function index() { if ($this->request->input('l')) { - LaravelLogViewer::setFile(base64_decode($this->request->input('l'))); + LaravelLogViewer::setFile(\Crypt::decrypt($this->request->input('l'))); } if ($this->request->input('dl')) { - return $this->download(LaravelLogViewer::pathToLogFile(base64_decode($this->request->input('dl')))); + return $this->download(LaravelLogViewer::pathToLogFile(\Crypt::decrypt($this->request->input('dl')))); } elseif ($this->request->has('del')) { - app('files')->delete(LaravelLogViewer::pathToLogFile(base64_decode($this->request->input('del')))); + app('files')->delete(LaravelLogViewer::pathToLogFile(\Crypt::decrypt($this->request->input('del')))); return $this->redirect($this->request->url()); } elseif ($this->request->has('delall')) { foreach(LaravelLogViewer::getFiles(true) as $file){ diff --git a/src/views/log.blade.php b/src/views/log.blade.php index 4ad7f10..066bc03 100644 --- a/src/views/log.blade.php +++ b/src/views/log.blade.php @@ -71,7 +71,7 @@

by Rap2h

@foreach($files as $file) - {{$file}} @@ -120,10 +120,10 @@ class="fa fa-search">@endif @endif
@if($current_file) - + Download file - - Delete file @if(count($files) > 1) -