Commit 61f3a2f3 authored by Adin Schmahmann's avatar Adin Schmahmann

fix: restrict remote pinning service endpoint URIs to HTTP/HTTPS

parent e0d48443
......@@ -740,7 +740,7 @@ func getRemotePinServiceInfo(env cmds.Environment, name string) (endpoint, key s
func normalizeEndpoint(endpoint string) (string, error) {
uri, err := neturl.ParseRequestURI(endpoint)
if err != nil || !strings.HasPrefix(uri.Scheme, "http") {
if err != nil || !(uri.Scheme == "http" || uri.Scheme == "https") {
return "", fmt.Errorf("service endpoint must be a valid HTTP URL")
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment