Skip to content

Commit

Permalink
PassiveTotal tags parameter bug fix (demisto#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itay4 authored Jul 26, 2018
1 parent a24bac5 commit 8519404
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Integrations/integration-PassiveTotal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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<allTags.length && !mal; i++) {
for (var j=0; j<badTags.length && !mal; j++) {
Expand Down Expand Up @@ -744,3 +746,4 @@ script:
subjectGivenName, subjectProvince, issuerSerialNumber, issuerEmailAddress'
description: Search for SSL certificates based on field values
runonce: false
releaseNotes: "Added backward compatibility support for the new parameter: tags"

0 comments on commit 8519404

Please sign in to comment.