Skip to content

Commit

Permalink
fix: restrict remote pinning service endpoint URIs to HTTP/HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Jan 27, 2021
1 parent 29004b2 commit 52c1034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/commands/pin/remotepin.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,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")
}

Expand Down

0 comments on commit 52c1034

Please sign in to comment.