Testing for logout functionality
This recipe focuses on testing the logout mechanism of the website. The logout mechanism is important in applications to terminate active sessions. Some attacks, such as cross-site scripting and CSRF, depend on having an active session present for a user account. Therefore, having well-built and configured logout functionality to terminate active sessions after a predefined time frame or after the user logout can help prevent cross-site scripting and CSRF attacks.
There are three elements that session termination requires and that should be tested for:
- The first one is a logout function. This usually appears as the logout button on most websites. The button should be present on all pages, and it should be noticeable so that the user cannot miss it when they decide to log out.
- The second is the session timeout period. The session timeout period specifies the length of the inactivity period before a session is terminated.
- The third...