You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add script folder in the list of script folders (options -> scripts -> add folder), i.e.: c:\zapscripts
Create standalone zest script "justinbieber.zst" and store it in "c:\zapscripts\standalone\justinbieber.zst"
Close ZAP GUI
Observed:
Path A) Execute: zap.bat -cmd -script c:\zapscripts\standalone\justinbieber.zst
ZAP returns silently.
Path B) Execute: zap.bat -script c:\zapscripts\standalone\justinbieber.zst
An exception is thrown in the console:
6915 [ZAP-BootstrapGUI] ERROR org.zaproxy.zap.extension.script.ExtensionScript - A script with the same name already exists: justinbieber.zst
java.security.InvalidParameterException: A script with the same name already exists: justinbieber.zst
at org.zaproxy.zap.extension.script.ScriptTreeModel.addScript(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.addScript(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.addScript(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.openCmdLineFile(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.execute(Unknown Source)
at org.parosproxy.paros.extension.ExtensionLoader.runCommandLine(Unknown Source)
at org.parosproxy.paros.control.Control.runCommandLine(Unknown Source)
at org.zaproxy.zap.GuiBootstrap.initControlAndPostViewInit(Unknown Source)
at org.zaproxy.zap.GuiBootstrap.access$100(Unknown Source)
at org.zaproxy.zap.GuiBootstrap$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Expected:
When a script is launched by an explicit call to the -script switch in the command line, it may show a clear intent from the user ("I want to execute this script"), therefore scripts marked for automated loading at start (i.e. no execution) should either be ignored/skipped or at least not trigger a conflict and result in a silent "ignore".
The text was updated successfully, but these errors were encountered:
Note that in "Path A" ZAP returns silently because in command line mode it does not write the log to standard output, the behaviour is the same though (i.e. it leads to an error).
I agree on the change of the behaviour. Any other opinions about that?
thc202
changed the title
Scripts passed with the -script switch conflict with script folders set in the GUI.
Scripts passed with the -script switch conflict with script folders
Dec 26, 2016
Steps:
Observed:
Path A) Execute: zap.bat -cmd -script c:\zapscripts\standalone\justinbieber.zst
ZAP returns silently.
Path B) Execute: zap.bat -script c:\zapscripts\standalone\justinbieber.zst
An exception is thrown in the console:
6915 [ZAP-BootstrapGUI] ERROR org.zaproxy.zap.extension.script.ExtensionScript - A script with the same name already exists: justinbieber.zst
java.security.InvalidParameterException: A script with the same name already exists: justinbieber.zst
at org.zaproxy.zap.extension.script.ScriptTreeModel.addScript(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.addScript(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.addScript(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.openCmdLineFile(Unknown Source)
at org.zaproxy.zap.extension.script.ExtensionScript.execute(Unknown Source)
at org.parosproxy.paros.extension.ExtensionLoader.runCommandLine(Unknown Source)
at org.parosproxy.paros.control.Control.runCommandLine(Unknown Source)
at org.zaproxy.zap.GuiBootstrap.initControlAndPostViewInit(Unknown Source)
at org.zaproxy.zap.GuiBootstrap.access$100(Unknown Source)
at org.zaproxy.zap.GuiBootstrap$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Expected:
When a script is launched by an explicit call to the -script switch in the command line, it may show a clear intent from the user ("I want to execute this script"), therefore scripts marked for automated loading at start (i.e. no execution) should either be ignored/skipped or at least not trigger a conflict and result in a silent "ignore".
The text was updated successfully, but these errors were encountered: