diff --git a/.golangci.yml b/.golangci.yml index 89f2c905e..6f15fbd41 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,24 +14,19 @@ linters-settings: linters: disable-all: true enable: - - typecheck - goimports - misspell - govet - revive - ineffassign - gosimple - - deadcode - - structcheck - gomodguard - gofmt - unused - - structcheck - unconvert - varcheck - gocritic - gofumpt - - tenv - durationcheck service: @@ -51,4 +46,4 @@ run: skip-dirs: - pkg/clientgen - pkg/apis/networking.gke.io - - restapi/operations \ No newline at end of file + - restapi/operations diff --git a/pkg/subnet/subnet.go b/pkg/subnet/subnet.go index 3ee39adb7..9ecdfe477 100644 --- a/pkg/subnet/subnet.go +++ b/pkg/subnet/subnet.go @@ -22,7 +22,6 @@ import ( "encoding/json" "errors" "fmt" - "log" "github.com/minio/console/pkg/http" @@ -150,7 +149,6 @@ func ParseLicense(client http.ClientI, license string) (*licverifier.LicenseInfo subnetPubKey, err := downloadSubnetPublicKey(client) if err != nil { - log.Print(err) // there was an issue getting the subnet public key // use hardcoded public keys instead publicKeys = OfflinePublicKeys diff --git a/restapi/configure_console.go b/restapi/configure_console.go index 39fab692a..698bfba83 100644 --- a/restapi/configure_console.go +++ b/restapi/configure_console.go @@ -372,20 +372,23 @@ func handleSPA(w http.ResponseWriter, r *http.Request) { sf.ObjectBrowser = true err := ValidateEncodedStyles(overridenStyles) - if err != nil { - log.Println(err) - } else { - sf.CustomStyleOB = overridenStyles + http.Error(w, err.Error(), http.StatusInternalServerError) + return } + sf.CustomStyleOB = overridenStyles + sessionID, err := login(consoleCreds, sf) if err != nil { - log.Println(err) - } else { - cookie := NewSessionCookieForConsole(*sessionID) - http.SetCookie(w, &cookie) + http.Error(w, err.Error(), http.StatusInternalServerError) + return } + + cookie := NewSessionCookieForConsole(*sessionID) + + http.SetCookie(w, &cookie) + // Allow us to be iframed w.Header().Del("X-Frame-Options") }