From c18a29f07edc9f756efa0d04f67991f3c902f10a Mon Sep 17 00:00:00 2001 From: "Berengar W. Lehr" Date: Wed, 30 Apr 2025 14:02:05 +0200 Subject: [PATCH] Update integration_fastapi.py Correct usage of fnmatch for ignoring some paths Signed-off-by: Berengar W. Lehr --- nc_py_api/ex_app/integration_fastapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nc_py_api/ex_app/integration_fastapi.py b/nc_py_api/ex_app/integration_fastapi.py index c1ffdb64..36ab326d 100644 --- a/nc_py_api/ex_app/integration_fastapi.py +++ b/nc_py_api/ex_app/integration_fastapi.py @@ -247,7 +247,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: conn = HTTPConnection(scope) url_path = conn.url.path.lstrip("/") - if not fnmatch.filter(self._disable_for, url_path): + if not any(fnmatch.fnmatch(url_path, i) for i in self._disable_for): try: scope["username"] = _request_sign_check(conn, AsyncNextcloudApp()) except HTTPException as exc: