zap-extensions icon indicating copy to clipboard operation
zap-extensions copied to clipboard

requester: add support for persisting tabs in session database

Open Warxim opened this issue 1 year ago • 11 comments

Hello, I would like to add support for persisting Requester tabs in session database, so that we do not loose them every time we restart Zaproxy.

Solution summary:

  • Created table "REQUESTER_TAB" for persisting tabs.
  • Added support for serializing Message data and storing them as JSON.
  • Added support for deserializing JSON to Message.
  • Created wrapper to handle persistance logic for ManualHttpRequestEditorPanel. (Store message change when it is sent or added to the editor.)
  • Refactored tabbed pane (and related classes) to make them more simple and easily integrable with persistence logic.

Warxim avatar Oct 16 '22 12:10 Warxim

Applied spotlessApply

Warxim avatar Oct 16 '22 19:10 Warxim

Resolved conflicts (rebase)

Warxim avatar Oct 19 '22 19:10 Warxim

@thc202 Hello, will you please look on this PR?

Warxim avatar Oct 24 '22 07:10 Warxim

I will once the main release is out.

thc202 avatar Oct 24 '22 07:10 thc202

All classes that are not intended to be used by other add-ons (IMO all being added) should be placed under the internal package, to make that clear.

The pull request needs to be rebased.

thc202 avatar Oct 28 '22 06:10 thc202

Moved classes under the internal package.

Warxim avatar Oct 28 '22 07:10 Warxim

Rebased onto current main.

Warxim avatar Oct 28 '22 07:10 Warxim

Sorry for so many force pushes, noticed that my changelog line was moved to "7.0.0" section during the rebase. Moved it back to unreleased section.

Warxim avatar Oct 28 '22 07:10 Warxim

Added @SuppressWarnings("serial") to UI classes, because of the failing build (18).

Warxim avatar Oct 28 '22 07:10 Warxim

@thc202 Hello, can I help somehow, so that this PR can be approved and merged?

Warxim avatar Dec 12 '22 22:12 Warxim

Rebased onto current main and resolved new conflicts. It is ready for review.

Warxim avatar Dec 22 '22 19:12 Warxim