Skip to content

Commit 61f3a2f

Browse files
committed
fix: restrict remote pinning service endpoint URIs to HTTP/HTTPS
1 parent e0d4844 commit 61f3a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/commands/pin/remotepin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ func getRemotePinServiceInfo(env cmds.Environment, name string) (endpoint, key s
740740

741741
func normalizeEndpoint(endpoint string) (string, error) {
742742
uri, err := neturl.ParseRequestURI(endpoint)
743-
if err != nil || !strings.HasPrefix(uri.Scheme, "http") {
743+
if err != nil || !(uri.Scheme == "http" || uri.Scheme == "https") {
744744
return "", fmt.Errorf("service endpoint must be a valid HTTP URL")
745745
}
746746

0 commit comments

Comments
 (0)