diff --git a/addOns/exim/CHANGELOG.md b/addOns/exim/CHANGELOG.md index 2613eced74..2ed0801fc8 100644 --- a/addOns/exim/CHANGELOG.md +++ b/addOns/exim/CHANGELOG.md @@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Import HAR entry sent and elapsed time. +- Duplicate or missing "Save URLs..." entries in the Export menu. +- The "Save All URLs..." export option was saving only the selected URLs. ## [0.12.0] - 2024-10-07 ### Changed diff --git a/addOns/exim/src/main/java/org/zaproxy/addon/exim/ExtensionExim.java b/addOns/exim/src/main/java/org/zaproxy/addon/exim/ExtensionExim.java index 1b8998bd5d..ce31a05aeb 100644 --- a/addOns/exim/src/main/java/org/zaproxy/addon/exim/ExtensionExim.java +++ b/addOns/exim/src/main/java/org/zaproxy/addon/exim/ExtensionExim.java @@ -56,9 +56,6 @@ public class ExtensionExim extends ExtensionAdaptor { private PopupMenuExportMessages popupMenuExportResponses; private PopupMenuExportMessages popupMenuExportMessages; - private PopupMenuExportContextUrls popupMenuExportContextUrls; - private PopupMenuExportSelectedUrls popupMenuExportSelectedrls; - private PopupMenuExportUrls popupMenuExportUrls; private PopupMenuCopyUrls popupMenuCopyUrls; public ExtensionExim() { @@ -98,14 +95,39 @@ public void hook(ExtensionHook extensionHook) { getMenuExport().add(getPopupMenuExportResponses()); } - extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuExportContextUrls()); - getMenuExport().add(getPopupMenuExportContextUrls()); - - extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuExportSelectedUrls()); - getMenuExport().add(getPopupMenuExportSelectedUrls()); - - extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuExportUrls()); - getMenuExport().add(getPopupMenuExportUrls()); + extensionHook + .getHookMenu() + .addPopupMenuItem( + new PopupMenuExportContextUrls( + Constant.messages.getString("exim.menu.export.saveurls"), + this)); + getMenuExport() + .add( + new PopupMenuExportContextUrls( + Constant.messages.getString("exim.menu.export.context.urls"), + this)); + + extensionHook + .getHookMenu() + .addPopupMenuItem( + new PopupMenuExportSelectedUrls( + Constant.messages.getString("exim.menu.export.saveurls"), + this)); + getMenuExport() + .add( + new PopupMenuExportSelectedUrls( + Constant.messages.getString("exim.menu.export.popup.selected"), + this)); + + extensionHook + .getHookMenu() + .addPopupMenuItem( + new PopupMenuExportUrls( + Constant.messages.getString("exim.menu.export.popup"), this)); + getMenuExport() + .add( + new PopupMenuExportUrls( + Constant.messages.getString("exim.menu.export.popup"), this)); extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuCopyUrls()); @@ -204,33 +226,6 @@ private PopupMenuExportMessages getPopupMenuExportResponses() { return popupMenuExportResponses; } - private PopupMenuExportContextUrls getPopupMenuExportContextUrls() { - if (popupMenuExportContextUrls == null) { - popupMenuExportContextUrls = - new PopupMenuExportContextUrls( - Constant.messages.getString("exim.menu.export.context.urls"), this); - } - return popupMenuExportContextUrls; - } - - private PopupMenuExportSelectedUrls getPopupMenuExportSelectedUrls() { - if (popupMenuExportSelectedrls == null) { - popupMenuExportSelectedrls = - new PopupMenuExportSelectedUrls( - Constant.messages.getString("exim.menu.export.popup.selected"), this); - } - return popupMenuExportSelectedrls; - } - - private PopupMenuExportUrls getPopupMenuExportUrls() { - if (popupMenuExportUrls == null) { - popupMenuExportUrls = - new PopupMenuExportSelectedUrls( - Constant.messages.getString("exim.menu.export.popup"), this); - } - return popupMenuExportUrls; - } - private PopupMenuCopyUrls getPopupMenuCopyUrls() { if (popupMenuCopyUrls == null) { popupMenuCopyUrls = diff --git a/addOns/exim/src/main/javahelp/help/contents/exim.html b/addOns/exim/src/main/javahelp/help/contents/exim.html index 37de6af130..ff6a3967ee 100644 --- a/addOns/exim/src/main/javahelp/help/contents/exim.html +++ b/addOns/exim/src/main/javahelp/help/contents/exim.html @@ -64,16 +64,16 @@

Save Responses...

Save Sites Tree...

This allows you to save the Sites Tree in the Sites Tree format -

Save URLs...

-This allows you to save all of the URLs accessed to a text or HTML file.
+

Save All URLs...

+This allows you to save all the accessed URLs to a text or HTML file.
This can be used, amongst other things, to compare the URLs available to users with different roles or permissions on the same system. (Also consider leveraging the Access Control Testing add-on.) -This functionality is also available via the right-click context menu. +This functionality is also available via the right-click context menu in the Sites tree panel. -

Context: Save URLs...

-All URLs in the Sites tree that fall within the selected context are exported. This functionality is -also available from the right-click menu when used on a Context node in the Sites tree panel. +

Save URLs...

+All URLs in the Sites tree that fall within the selected node are exported. This functionality is +also available from the right-click menu when used on a Site or Context node in the Sites tree panel.

ZAP API

This add-on also exposes various ZAP API endpoints to facilitate programmatic use of the functionality. diff --git a/addOns/exim/src/main/resources/org/zaproxy/addon/exim/resources/Messages.properties b/addOns/exim/src/main/resources/org/zaproxy/addon/exim/resources/Messages.properties index 5bac48c560..a2db42ab38 100644 --- a/addOns/exim/src/main/resources/org/zaproxy/addon/exim/resources/Messages.properties +++ b/addOns/exim/src/main/resources/org/zaproxy/addon/exim/resources/Messages.properties @@ -98,16 +98,16 @@ exim.importurls.warn.scheme = "{0}" does not have a scheme. exim.menu.copyurls.popup = Copy URLs exim.menu.export = Export -exim.menu.export.context.urls = Save URLs... +exim.menu.export.context.urls = Save Context URLs... exim.menu.export.messages.popup = Save Messages... exim.menu.export.messages.select.warning = Select HTTP messages in History panel before export to file. exim.menu.export.mnemonic = E exim.menu.export.popup = Save All URLs... exim.menu.export.popup.context.error = Please select a Context. -exim.menu.export.popup.selected = Save URLs... +exim.menu.export.popup.selected = Save Selected URLs... exim.menu.export.responses.popup = Save Response(s)... - exim.menu.export.savesite.popup = Save Sites Tree... +exim.menu.export.saveurls = Save URLs... exim.menu.export.urls.save.error = Error saving file to {0} exim.options.value.type.har = HAR (HTTP Archive File)