Unverified Commit a4544ece authored by Darren Shepherd's avatar Darren Shepherd Committed by GitHub
Browse files

Merge pull request #26382 from ibuildthecloud/master

Fix 502 masking steve errors
parents c0dc4d40 86419826
Showing with 9 additions and 7 deletions
+9 -7
......@@ -86,7 +86,7 @@ require (
github.com/rancher/remotedialer v0.2.6-0.20200403185207-c326f2656545
github.com/rancher/rke v1.1.0-rc9.0.20200329162208-b513e200abc2
github.com/rancher/security-scan v0.1.7-0.20200222041501-f7377f127168
github.com/rancher/steve v0.0.0-20200326205851-420f62f642eb
github.com/rancher/steve v0.0.0-20200331001732-ccc92e7b19f2
github.com/rancher/system-upgrade-controller v0.4.1-0.20200326220202-4655d4a551bd
github.com/rancher/types v0.0.0-20200404135832-7a787b354966
github.com/rancher/wrangler v0.5.4-0.20200326191509-4054411d9736
......
......@@ -905,13 +905,11 @@ github.com/rancher/saml v0.0.0-20180713225824-ce1532152fde h1:+gd9up4jLeFeuNC5bH
github.com/rancher/saml v0.0.0-20180713225824-ce1532152fde/go.mod h1:Bp1IBnlwVB1EqRfSKecoPyf+1Wjh8zykMjlq4vJJhxY=
github.com/rancher/security-scan v0.1.7-0.20200222041501-f7377f127168 h1:SIshhsz0O71FYyyDmjUmbFGvmgp4ASm8J1zmhMK/UG0=
github.com/rancher/security-scan v0.1.7-0.20200222041501-f7377f127168/go.mod h1:WlLAocVyVQs5J8r0IiQXsp0ajVZO6hYi/Vo6zxjo73s=
github.com/rancher/steve v0.0.0-20200326205851-420f62f642eb h1:pt/OMUb8MEWDc73VAoxrB52rV4yeZuUCWOPWuvEB47s=
github.com/rancher/steve v0.0.0-20200326205851-420f62f642eb/go.mod h1:BABDaLXbTNCXQ7pljRdxkK3oXQiUwj0E1Rzxvit5/L8=
github.com/rancher/steve v0.0.0-20200331001732-ccc92e7b19f2 h1:Ndc5ccha+kfJNxA5wZ8mJQNYAQIUIhizYe/rgCohnxM=
github.com/rancher/steve v0.0.0-20200331001732-ccc92e7b19f2/go.mod h1:BABDaLXbTNCXQ7pljRdxkK3oXQiUwj0E1Rzxvit5/L8=
github.com/rancher/system-upgrade-controller v0.4.1-0.20200326220202-4655d4a551bd h1:h4VDCviV2Iixfk9SjUcfzq0l+pRsvadt2QSNuoQKfxE=
github.com/rancher/system-upgrade-controller v0.4.1-0.20200326220202-4655d4a551bd/go.mod h1:8x2eK9Q5/1c2AC9xJtNFyAyjP9ytP4uPHhGA6wajIS0=
github.com/rancher/types v0.0.0-20200326224235-0d1e1dcc8d55/go.mod h1:k5LoTlUpefw0eAzFSJsZI0gf+C4WE41yrc1jm/MS1nM=
github.com/rancher/types v0.0.0-20200403175648-784a390255fa h1:wgz23pdOE4zBjlP+eiAXUELCSYBDasN48R8lhHxc7MA=
github.com/rancher/types v0.0.0-20200403175648-784a390255fa/go.mod h1:dFo1jHAqDecEB+ODKVTx1I7YXpW1qbH2ybOaU3SSDD4=
github.com/rancher/types v0.0.0-20200404135832-7a787b354966 h1:wnrSNbnN8wysvw4VZnYoD7yUH03+0ZUwUdNeM+USal0=
github.com/rancher/types v0.0.0-20200404135832-7a787b354966/go.mod h1:dFo1jHAqDecEB+ODKVTx1I7YXpW1qbH2ybOaU3SSDD4=
github.com/rancher/wrangler v0.1.4/go.mod h1:EYP7cqpg42YqElaCm+U9ieSrGQKAXxUH5xsr+XGpWyE=
......
......@@ -6,6 +6,7 @@ import (
"io"
"io/ioutil"
"net/http"
"reflect"
"regexp"
"github.com/pkg/errors"
......@@ -65,7 +66,7 @@ func decodeParams(apiOp *types.APIRequest, target runtime.Object) error {
}
func toAPI(schema *types.APISchema, obj runtime.Object) types.APIObject {
if obj == nil {
if obj == nil || reflect.ValueOf(obj).IsNil() {
return types.APIObject{}
}
......@@ -141,6 +142,9 @@ func moveToUnderscore(obj *unstructured.Unstructured) *unstructured.Unstructured
}
func rowToObject(obj *unstructured.Unstructured) {
if obj == nil {
return
}
if obj.Object["kind"] != "Table" ||
obj.Object["apiVersion"] != "meta.k8s.io/v1" {
return
......
......@@ -448,7 +448,7 @@ github.com/rancher/rke/util
# github.com/rancher/security-scan v0.1.7-0.20200222041501-f7377f127168
github.com/rancher/security-scan/pkg/kb-summarizer/report
github.com/rancher/security-scan/pkg/kb-summarizer/summarizer
# github.com/rancher/steve v0.0.0-20200326205851-420f62f642eb
# github.com/rancher/steve v0.0.0-20200331001732-ccc92e7b19f2
github.com/rancher/steve/pkg/accesscontrol
github.com/rancher/steve/pkg/attributes
github.com/rancher/steve/pkg/auth
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment