Skip to content

Unexpected Behavior after deleting a session #608

@pwnfoo

Description

@pwnfoo

Steps to Reproduce :

  1. Navigate to Targets, click on Sessions and add a New Session, say Test Session.

screenshot from 2016-03-17 23-04-50


  1. Select Test session as the session and then delete it, Click outside the popup to close it.

screenshot from 2016-03-17 23-05-51


  1. Notice that Test Session is still selected as the session. Try adding a Target URL. You'll be greeted with an error.

screenshot from 2016-03-17 23-06-26


#### What's happening?

As far as I understood, the delete method in OWTFSessionHandler deletes the session from the db but doesn't set it to the default value after deletion.

Snippet from api_handlers.py :

def delete(self, session_id=None, action=None):
        if session_id is None or \
           action is not None:
            raise tornado.web.HTTPError(400)
        try:
            self.get_component("session_db").delete_session(
                int(session_id))
        except exceptions.InvalidSessionReference:
            raise tornado.web.HTTPError(400)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions