π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Require HTTPS for Cast API endpoints
Neeraj Guptadc1676000de5
diff --git a/apple/apps/cast/Cast/Info.plist b/apple/apps/cast/Cast/Info.plistindex cadb856ad7..1853b470de 100644--- a/apple/apps/cast/Cast/Info.plist+++ b/apple/apps/cast/Cast/Info.plist@@ -2,11 +2,6 @@<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>- <key>NSAppTransportSecurity</key>- <dict>- <key>NSAllowsLocalNetworking</key>- <true/>- </dict><key>UIAppFonts</key><array><string>Montserrat-Bold.ttf</string>diff --git a/apple/apps/cast/Cast/Services/APIEndpoint.swift b/apple/apps/cast/Cast/Services/APIEndpoint.swiftindex ab6dfdc946..fefb1f37aa 100644--- a/apple/apps/cast/Cast/Services/APIEndpoint.swift+++ b/apple/apps/cast/Cast/Services/APIEndpoint.swift@@ -12,15 +12,14 @@ enum APIEndpoint {static func update(_ value: String) async throws {let value = value.trimmingCharacters(in: .whitespacesAndNewlines)guard var components = URLComponents(string: value),- let scheme = components.scheme,- ["http", "https"].contains(scheme.lowercased()),+ components.scheme?.lowercased() == "https",components.host != nil,components.user == nil,components.query == nil,components.fragment == nil,components.path.isEmpty || components.path == "/"else { throw EndpointError.invalidURL }- components.scheme = scheme.lowercased()+ components.scheme = "https"components.path = ""guard let url = components.url else { throw EndpointError.invalidURL }@@ -37,7 +36,7 @@ enum APIEndpoint {private struct Ping: Decodable { let message: String }private enum EndpointError: String, LocalizedError {- case invalidURL = "Enter a valid HTTP or HTTPS API URL"+ case invalidURL = "Enter a valid HTTPS API URL"case invalidServer = "The URL is not an Ente API server"var errorDescription: String? { rawValue }}