diff --git a/src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java b/src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java index 77e7d5b613e..8993f5c3da9 100644 --- a/src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java +++ b/src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java @@ -450,7 +450,7 @@ protected HttpSessionsPanel getHttpSessionsPanel() { * missing, a default protocol of 80 is used. * @return the http sessions site container */ - protected HttpSessionsSite getHttpSessionsSite(String site) { + public HttpSessionsSite getHttpSessionsSite(String site) { return getHttpSessionsSite(site, true); } @@ -467,7 +467,7 @@ protected HttpSessionsSite getHttpSessionsSite(String site) { * false * */ - protected HttpSessionsSite getHttpSessionsSite(String site, boolean createIfNeeded) { + public HttpSessionsSite getHttpSessionsSite(String site, boolean createIfNeeded) { // Add a default port if (!site.contains(":")) { site = site + (":80"); @@ -607,8 +607,7 @@ public void onHttpRequestSend(HttpMessage msg, int initiator, HttpSender sender) @Override public void onHttpResponseReceive(HttpMessage msg, int initiator, HttpSender sender) { - if (initiator == HttpSender.ACTIVE_SCANNER_INITIATOR || initiator == HttpSender.SPIDER_INITIATOR - || initiator == HttpSender.CHECK_FOR_UPDATES_INITIATOR) { + if (initiator == HttpSender.CHECK_FOR_UPDATES_INITIATOR) { // Not a session we care about return; } diff --git a/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java b/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java index 1ea737c596f..46ddd0bf652 100644 --- a/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java +++ b/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java @@ -567,7 +567,7 @@ protected void cleanupSessionToken(String token) { * * @return the http sessions */ - protected Set getHttpSessions() { + public Set getHttpSessions() { synchronized (this.sessions) { return Collections.unmodifiableSet(sessions); } @@ -579,7 +579,7 @@ protected Set getHttpSessions() { * @param name the name * @return the http session with a given name, or null, if no such session exists */ - protected HttpSession getHttpSession(String name) { + public HttpSession getHttpSession(String name) { synchronized (this.sessions) { for (HttpSession session : sessions) { if (session.getName().equals(name)) { @@ -626,4 +626,8 @@ public boolean renameHttpSession(String oldName, String newName) { static void resetLastGeneratedSessionId() { lastGeneratedSessionID = 0; } + + public static int getNextSessionId() { + return lastGeneratedSessionID++; + } }