Skip to content

Commit

Permalink
Fixed common/config.go to check the URI scheme according to rfc3986#s…
Browse files Browse the repository at this point in the history
…ection-3.1
  • Loading branch information
arizvisa committed Feb 14, 2018
1 parent 956f077 commit 74efe53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func DownloadableURL(original string) (string, error) {
func ValidatedURL(original string) (string, error) {

// See if the user failed to give a url
if ok, _ := regexp.MatchString("(?m)^[^[:punct:]]+://", original); !ok {
if ok, _ := regexp.MatchString("(?m)^[[:alnum:]+-.]+://", original); !ok {

// So since no magic was found, this must be a path.
result, err := DownloadableURL(original)
Expand Down

0 comments on commit 74efe53

Please sign in to comment.