Skip to content

Commit 0257d78

Browse files
esunedbluhm
authored andcommitted
Correctly handle null value for --base-wallet-routes
Signed-off-by: Emiliano Suñé <[email protected]>
1 parent 84a9f33 commit 0257d78

File tree

1 file changed

+4
-2
lines changed
  • acapy_agent/admin/decorators

1 file changed

+4
-2
lines changed

acapy_agent/admin/decorators/auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ def _base_wallet_route_access(additional_routes: str, request_path: str) -> bool
9797
def _build_additional_routes_pattern(pattern_string: str) -> Optional[Pattern]:
9898
"""Build pattern from space delimited list of paths."""
9999
# create array and add word boundary to avoid false positives
100-
paths = pattern_string.split(" ")
101-
return re.compile("^((?:)" + "|".join(paths) + ")$")
100+
if pattern_string:
101+
paths = pattern_string.split(" ")
102+
return re.compile("^((?:)" + "|".join(paths) + ")$")
103+
return None
102104

103105

104106
def _matches_additional_routes(pattern: Pattern, path: str) -> bool:

0 commit comments

Comments
 (0)