fix: validate_caldav_url crashes with TypeError on a non-string URL (#1608)

This commit is contained in:
Afonso Coutinho
2026-06-03 00:35:16 +01:00
committed by GitHub
parent 0d88c9989e
commit 382d49d887
2 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ def _validate_caldav_ip(host: str) -> None:
def validate_caldav_url(raw_url: str) -> str:
"""Validate and normalize a user-provided CalDAV URL before server-side use."""
url = (raw_url or "").strip()
url = (raw_url if isinstance(raw_url, str) else "").strip()
if not url:
raise ValueError("CalDAV URL is required")
parsed = urlparse(url)