From 8519404dd2ccdbbd5c3b898421efd192a9610473 Mon Sep 17 00:00:00 2001 From: Itay4 <31018228+Itay4@users.noreply.github.com> Date: Thu, 26 Jul 2018 18:27:25 +0300 Subject: [PATCH] PassiveTotal tags parameter bug fix (#1855) --- Integrations/integration-PassiveTotal.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Integrations/integration-PassiveTotal.yml b/Integrations/integration-PassiveTotal.yml index 443462977415..11955f75817e 100644 --- a/Integrations/integration-PassiveTotal.yml +++ b/Integrations/integration-PassiveTotal.yml @@ -86,6 +86,12 @@ script: params.proxy = true; } + // Handle upgrade scenarios where there is no default + var tags = params.tags; + if (tags === undefined) { + tags = 'malware,blacklist,phishing,typo-squatting'; + } + var doReq = function(method, path, parameters, body) { var result = http( serverUrl + path + encodeToURLQuery(parameters), @@ -207,11 +213,7 @@ script: if (jsonRes.classification === 'malicious') { mal = true; } else { - // Handle upgrade scenarios where there is no default - if (!params.tags) { - params.tags = 'malware,blacklist,phishing,typo-squatting'; - } - var badTags = argToList(params.tags); + var badTags = argToList(tags); var allTags = [jsonRes.tags, jsonRes.system_tags, jsonRes.global_tags]; for (var i=0; i