From f4bc029a3aae833356ffa633940cda93e3496471 Mon Sep 17 00:00:00 2001 From: Remy Noel Date: Fri, 12 May 2023 18:51:47 +0200 Subject: [PATCH] fix: prevent matching subpaths upon introspections. --- src/dbus_fast/message_bus.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dbus_fast/message_bus.py b/src/dbus_fast/message_bus.py index 73a9d9a9..2e7ae132 100644 --- a/src/dbus_fast/message_bus.py +++ b/src/dbus_fast/message_bus.py @@ -673,6 +673,8 @@ def _introspect_export_path(self, path: str) -> intr.Node: children = set() for export_path in self._path_exports: + if not export_path.startswith(path): + continue try: child_path = export_path.split(path, maxsplit=1)[1] except IndexError: