Allow only "http" and "https" URLs

This commit is contained in:
Tianon Gravi 2016-06-08 10:36:33 -07:00
parent c1549952f3
commit d6068c47a7
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ func Fetch(library, repo string) (string, string, *Manifest2822, error) {
}
u, err := url.Parse(repo)
if err == nil && u.IsAbs() {
if err == nil && u.IsAbs() && (u.Scheme == "http" || u.Scheme == "https") {
// must be remote URL!
resp, err := http.Get(repo)
if err != nil {