From 24c2ef67d467b67b49b8ef1d4fe661835023fa6a Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Wed, 15 Dec 2021 12:02:01 +0100 Subject: [PATCH] Updated antivirus spelling --- app/controllers/api/health.php | 2 +- app/controllers/api/storage.php | 12 ++++++------ app/tasks/doctor.php | 10 +++++----- docs/specs/overview.drawio.svg | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 24476638db..429aaefc96 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -351,7 +351,7 @@ App::get('/v1/health/anti-virus') $output['status'] = 'disabled'; $output['version'] = ''; } else { - $antiVirus = new Network(App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'), + $antivirus = new Network(App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'), (int) App::getEnv('_APP_STORAGE_ANTIVIRUS_PORT', 3310)); try { diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 01ff26f295..40d312da0c 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -98,10 +98,10 @@ App::post('/v1/storage/files') $mimeType = $device->getFileMimeType($path); // Get mime-type before compression and encryption if (App::getEnv('_APP_STORAGE_ANTIVIRUS') === 'enabled') { // Check if scans are enabled - $antiVirus = new Network(App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'), + $antivirus = new Network(App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'), (int) App::getEnv('_APP_STORAGE_ANTIVIRUS_PORT', 3310)); - if (!$antiVirus->fileScan($path)) { + if (!$antivirus->fileScan($path)) { $device->delete($path); throw new Exception('Invalid file', 403); } @@ -652,11 +652,11 @@ App::delete('/v1/storage/files/:fileId') // $source = $compressor->decompress($source); -// $antiVirus = new Network('clamav', 3310); +// $antivirus = new Network('clamav', 3310); -// //var_dump($antiVirus->ping()); -// //var_dump($antiVirus->version()); -// //var_dump($antiVirus->fileScan('/storage/uploads/app-1/5/9/f/e/59fecaed49645.pdf')); +// //var_dump($antivirus->ping()); +// //var_dump($antivirus->version()); +// //var_dump($antivirus->fileScan('/storage/uploads/app-1/5/9/f/e/59fecaed49645.pdf')); // } // ); diff --git a/app/tasks/doctor.php b/app/tasks/doctor.php index 095adfb951..47e523ff94 100644 --- a/app/tasks/doctor.php +++ b/app/tasks/doctor.php @@ -113,17 +113,17 @@ $cli if(App::getEnv('_APP_STORAGE_ANTIVIRUS') === 'enabled') { // Check if scans are enabled try { - $antiVirus = new Network(App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'), + $antivirus = new Network(App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'), (int) App::getEnv('_APP_STORAGE_ANTIVIRUS_PORT', 3310)); - if((@$antiVirus->ping())) { - Console::success('AntiVirus...........connected 👍'); + if((@$antivirus->ping())) { + Console::success('Antivirus...........connected 👍'); } else { - Console::error('AntiVirus........disconnected 👎'); + Console::error('Antivirus........disconnected 👎'); } } catch (\Throwable $th) { - Console::error('AntiVirus........disconnected 👎'); + Console::error('Antivirus........disconnected 👎'); } } diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index 516749492d..f86059e2ac 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -714,13 +714,13 @@
- AntiVirus (ClamAV) + Antivirus (ClamAV)
- AntiVirus (ClamAV) + Antivirus (ClamAV)