Require HTTPS for WebDAV sync

This commit is contained in:
livio committed 2026-09-29 11:27:42 +02:00
1 parent 480134538a
commit a7c8127091
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -36,9 +36,9 @@ public sealed class CloudSyncService
private static Uri BuildTarget(string endpoint)
{
if (!Uri.TryCreate(endpoint?.Trim(), UriKind.Absolute, out var uri)
|| (uri.Scheme != Uri.UriSchemeHttps && uri.Scheme != Uri.UriSchemeHttp))
|| uri.Scheme != Uri.UriSchemeHttps)
{
throw new ArgumentException("Inserisci un indirizzo WebDAV http o https valido.");
throw new ArgumentException("Inserisci un indirizzo WebDAV HTTPS valido.");
}
return uri.AbsolutePath.EndsWith(".zip", StringComparison.OrdinalIgnoreCase)
? uri