summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXie Ning <xiening.xll@bytedance.com>2022-06-29 13:27:47 +0300
committerEd Tanous <ed@tanous.net>2023-02-28 03:30:15 +0300
commit9fa06f190a025693af3b7cc76c8b19163afe4d08 (patch)
tree145ccea4b3eaa2ba5c3db554f4ce1b2927344641 /src
parent36ecbf3517ec0a742a9353531472c5ca77513903 (diff)
downloadbmcweb-9fa06f190a025693af3b7cc76c8b19163afe4d08.tar.xz
Remove sessions when user is deleted
An Internal server Error will happen if you delete the login user. Match the "InterfacesRemoved" signal for monitoring the user status and delete the session to fix this bug. Tested: 1. Add a new user such as test 2. Login with the new user in web 3. Delete or rename the user by web and ipmi command 4. Refresh the web and a new user was needed to login in the web Signed-off-by: Xie Ning <xiening.xll@bytedance.com> Change-Id: I2b53edb71d9a4e904c7da54393539f87eeb2d7a3
Diffstat (limited to 'src')
-rw-r--r--src/webserver_main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 1dbeb061ae..8e3a6f4ca9 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -16,6 +16,7 @@
#include "redfish_aggregator.hpp"
#include "security_headers.hpp"
#include "ssl_key_handler.hpp"
+#include "user_monitor.hpp"
#include "vm_websocket.hpp"
#include "webassets.hpp"
@@ -147,6 +148,8 @@ static int run()
crow::hostname_monitor::registerHostnameSignal();
#endif
+ bmcweb::registerUserRemovedSignal();
+
app.run();
io->run();