fix circular import related to user/path value check

This commit is contained in:
Peter Bieringer
2026-04-23 08:33:53 +02:00
parent 56724496d2
commit 1495849b61
4 changed files with 74 additions and 61 deletions

View File

@@ -25,6 +25,7 @@ from http import client
from urllib.parse import unquote, urlparse
from radicale import httputils, pathutils, storage, types
from radicale.app import base as app_base
from radicale.app.base import Access, ApplicationBase
from radicale.log import logger
@@ -82,7 +83,7 @@ class ApplicationPartMove(ApplicationBase):
if not access.check("w"):
return httputils.NOT_ALLOWED
to_path = pathutils.sanitize_path(to_url.path)
if not self._check_path_format(to_path):
if not app_base._check_path_format(self._storage, to_path, self._validate_path_value):
logger.warning("request contains invalid path: %r (not compliant to %r)", to_path, self._validate_path_value)
return httputils.BAD_REQUEST
if not (to_path + "/").startswith(base_prefix + "/"):