From: garciadeblas Date: Tue, 17 Sep 2024 16:00:50 +0000 (+0200) Subject: Replace the use of eval when reading env variable OSMNBI_USER_MANAGEMENT X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=7a0dace32490a53dde41d7347be86098c81cce82;p=osm%2FNBI.git Replace the use of eval when reading env variable OSMNBI_USER_MANAGEMENT Change-Id: Ic50126edc28f01b501789c35a2abb17e48c51f01 Signed-off-by: garciadeblas --- 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)