Skip to content

Commit

Permalink
Don't handle filenames with a colon in it as http(s) url
Browse files Browse the repository at this point in the history
  • Loading branch information
penguwin authored and muesli committed Oct 15, 2020
1 parent 30d37a1 commit 7f35996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func sourceFromArg(arg string) (*source, error) {
}

// HTTP(S) URLs:
if u, err := url.ParseRequestURI(arg); err == nil {
if u, err := url.ParseRequestURI(arg); err == nil && strings.Contains(arg, "://") {
if u.Scheme != "" {
if u.Scheme != "http" && u.Scheme != "https" {
return nil, fmt.Errorf("%s is not a supported protocol", u.Scheme)
Expand Down

0 comments on commit 7f35996

Please sign in to comment.