From 5bfa5b5475c618da0bf9d110bbc3f777d1d037e3 Mon Sep 17 00:00:00 2001 From: thc202 Date: Thu, 21 Nov 2024 10:26:18 +0000 Subject: [PATCH] pscan: set config always to the scan rules Move the view check to the correct place to set the config to the scan rules always (headless and GUI). Signed-off-by: thc202 --- .../zaproxy/addon/pscan/ExtensionPassiveScan2.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addOns/pscan/src/main/java/org/zaproxy/addon/pscan/ExtensionPassiveScan2.java b/addOns/pscan/src/main/java/org/zaproxy/addon/pscan/ExtensionPassiveScan2.java index 534dbe9cf8..c26bc95464 100644 --- a/addOns/pscan/src/main/java/org/zaproxy/addon/pscan/ExtensionPassiveScan2.java +++ b/addOns/pscan/src/main/java/org/zaproxy/addon/pscan/ExtensionPassiveScan2.java @@ -109,16 +109,16 @@ public ExtensionPassiveScan2() { PassiveScanner scanner = (PassiveScanner) args[0]; try { boolean added = scanRuleManager.add(scanner); - if (added - && hasView() - && scanner instanceof PluginPassiveScanner) { + if (added && scanner instanceof PluginPassiveScanner) { PluginPassiveScanner pps = (PluginPassiveScanner) scanner; pps.setConfig( getModel().getOptionsParam().getConfig()); - getPolicyPanel() - .getPassiveScanTableModel() - .addScanner(pps); + if (hasView()) { + getPolicyPanel() + .getPassiveScanTableModel() + .addScanner(pps); + } } return added;