Require HTTPS for WebDAV sync
This commit is contained in:
1 parent
480134538a
commit
a7c8127091
2 files changed
+3
-3
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user