Skip to content

Commit

Permalink
fix: prevent matching subpaths upon introspections
Browse files Browse the repository at this point in the history
  • Loading branch information
Remy Noel committed May 15, 2023
1 parent 1af70bf commit 9107ff1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dbus_fast/message_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,10 @@ def _introspect_export_path(self, path: str) -> intr.Node:
children = set()

for export_path in self._path_exports:
try:
child_path = export_path.split(path, maxsplit=1)[1]
except IndexError:
if not export_path.startswith(path):
continue

child_path = export_path.split(path, maxsplit=1)[1]
child_path = child_path.lstrip("/")
child_name = child_path.split("/", maxsplit=1)[0]

Expand Down

0 comments on commit 9107ff1

Please sign in to comment.