diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-07 20:14:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 20:14:59 +0200 |
commit | 08fa3d511f2b96613bbbe76e517f2c9288e5bf56 (patch) | |
tree | 0210f08935553ea30dd17d4f19086de4b5fa880c /vendor/github.com/xeipuuv | |
parent | 9d0d9df6a1973ce9982071601fbdca68c93c6d07 (diff) | |
parent | 42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd (diff) | |
download | podman-08fa3d511f2b96613bbbe76e517f2c9288e5bf56.tar.gz podman-08fa3d511f2b96613bbbe76e517f2c9288e5bf56.tar.bz2 podman-08fa3d511f2b96613bbbe76e517f2c9288e5bf56.zip |
Merge pull request #5744 from vrothberg/update-image
vendor c/image v5.4.2
Diffstat (limited to 'vendor/github.com/xeipuuv')
-rw-r--r-- | vendor/github.com/xeipuuv/gojsonschema/.travis.yml | 2 | ||||
-rw-r--r-- | vendor/github.com/xeipuuv/gojsonschema/draft.go | 5 | ||||
-rw-r--r-- | vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go | 7 |
3 files changed, 13 insertions, 1 deletions
diff --git a/vendor/github.com/xeipuuv/gojsonschema/.travis.yml b/vendor/github.com/xeipuuv/gojsonschema/.travis.yml index 36155164d..3289001cd 100644 --- a/vendor/github.com/xeipuuv/gojsonschema/.travis.yml +++ b/vendor/github.com/xeipuuv/gojsonschema/.travis.yml @@ -1,8 +1,8 @@ language: go go: - - "1.10" - "1.11" - "1.12" + - "1.13" before_install: - go get github.com/xeipuuv/gojsonreference - go get github.com/xeipuuv/gojsonpointer diff --git a/vendor/github.com/xeipuuv/gojsonschema/draft.go b/vendor/github.com/xeipuuv/gojsonschema/draft.go index 7a0123cc7..61298e7aa 100644 --- a/vendor/github.com/xeipuuv/gojsonschema/draft.go +++ b/vendor/github.com/xeipuuv/gojsonschema/draft.go @@ -92,6 +92,11 @@ func parseSchemaURL(documentNode interface{}) (string, *Draft, error) { if isKind(documentNode, reflect.Bool) { return "", nil, nil } + + if !isKind(documentNode, reflect.Map) { + return "", nil, errors.New("schema is invalid") + } + m := documentNode.(map[string]interface{}) if existsMapKey(m, KEY_SCHEMA) { diff --git a/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go b/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go index 4f57ff789..5d88af263 100644 --- a/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go +++ b/vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go @@ -33,6 +33,7 @@ import ( "io" "io/ioutil" "net/http" + "net/url" "os" "path/filepath" "runtime" @@ -145,6 +146,12 @@ func (l *jsonReferenceLoader) LoadJSON() (interface{}, error) { if reference.HasFileScheme { filename := strings.TrimPrefix(refToURL.String(), "file://") + filename, err = url.QueryUnescape(filename) + + if err != nil { + return nil, err + } + if runtime.GOOS == "windows" { // on Windows, a file URL may have an extra leading slash, use slashes // instead of backslashes, and have spaces escaped |