guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.68k stars 786 forks source link

Fix logoff on token expiration #4171

Open VakarisZ opened 6 months ago

VakarisZ commented 6 months ago

Describe the bug

When the token expires it responds with 401 to any request. Frontend sometimes can't handle the unexpected 401 response and crashes instead of redirecting to the login page.

To Reproduce

Steps to reproduce the behavior:

  1. Go to available plugins page
  2. Delete token
  3. Refresh the page

Expected behavior

On 401 we should redirect to the login page before the front end tries to parse the response.