From ebbc480ac23bfb4c90e02f37e59dea7d71199d73 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sat, 8 Jul 2023 14:28:46 +0200 Subject: [PATCH] configd: minor regrssion in deeper nested command structures. when the requested path doesn't exist it may run out of boundaries (returning an empty string). error in question: .. line 310, in find_action while type(target) is dict and action[0] in target: IndexError: list index out of range ... --- src/opnsense/service/modules/processhandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/modules/processhandler.py b/src/opnsense/service/modules/processhandler.py index 715a2c1ce..82f1ac2ef 100644 --- a/src/opnsense/service/modules/processhandler.py +++ b/src/opnsense/service/modules/processhandler.py @@ -307,7 +307,7 @@ class ActionHandler(object): :return: action object or None if not found """ target = self.action_map - while type(target) is dict and action[0] in target: + while type(target) is dict and len(action) > 0 and action[0] in target: tmp = action.pop(0) target = target[tmp]