Skip to content

Commit

Permalink
makes the upload scanning respect the disableUnscannedTag setting (#60)
Browse files Browse the repository at this point in the history
* makes the upload scanning respect the disableUnscannedTag setting
* move the condition to the tagFile function

(cherry picked from commit d2df618)
  • Loading branch information
unglaublicherdude authored and lennartdohmann committed Jun 25, 2024
1 parent 78109a5 commit b052476
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Service/VerdictService.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ private function tagFile(int $fileId, string $tagName) {
} catch (Exception) {
}
break;
case TagService::UNSCANNED:
$unscannedTagIsDisabled = $this->appConfig->getValueBool(Application::APP_ID, 'disableUnscannedTag');
if (!$unscannedTagIsDisabled)
$this->tagService->setTag($fileId, $tagName);
case TagService::CLEAN:
case TagService::PUP:
case TagService::WONT_SCAN:
Expand Down Expand Up @@ -195,7 +199,7 @@ public function tagLastScannedFile(string $localPath, int $fileId): void {
if ($this->lastVaasVerdict !== null) {
$this->tagFile($fileId, $this->lastVaasVerdict->Verdict->value);
} else {
$this->tagFile($fileId, TagService::UNSCANNED);
$this->tagFile($fileId, TagService::UNSCANNED);
}
}
}
Expand Down

0 comments on commit b052476

Please sign in to comment.