From 7a0dace32490a53dde41d7347be86098c81cce82 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 17 Sep 2024 18:00:50 +0200 Subject: [PATCH] Replace the use of eval when reading env variable OSMNBI_USER_MANAGEMENT Change-Id: Ic50126edc28f01b501789c35a2abb17e48c51f01 Signed-off-by: garciadeblas --- osm_nbi/nbi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 3728943..c37e24e 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -2394,7 +2394,7 @@ def _start_service(): engine_config = cherrypy.tree.apps["/osm"].config for k, v in environ.items(): if k == "OSMNBI_USER_MANAGEMENT": - feature_state = eval(v.title()) + feature_state = v.lower() == "true" engine_config["authentication"]["user_management"] = feature_state elif k == "OSMNBI_PWD_EXPIRE_DAYS": pwd_expire_days = int(v) -- 2.25.1