[ARVADOS] updated: 1.3.0-3127-g61d493d84
Git user
git at public.arvados.org
Wed Sep 16 15:24:19 UTC 2020
Summary of changes:
lib/controller/localdb/login_oidc.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
via 61d493d84cff707e291132847ac3e9792ae94aee (commit)
from 91a7d2e6bb09fe12bcf18f0b0340c63cf27fae23 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 61d493d84cff707e291132847ac3e9792ae94aee
Author: Tom Clegg <tom at tomclegg.ca>
Date: Wed Sep 16 11:24:05 2020 -0400
16669: Fix nil pointer dereference.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/controller/localdb/login_oidc.go b/lib/controller/localdb/login_oidc.go
index 3858e9cf6..df3368488 100644
--- a/lib/controller/localdb/login_oidc.go
+++ b/lib/controller/localdb/login_oidc.go
@@ -343,7 +343,9 @@ type oidcTokenAuthorizer struct {
}
func (ta *oidcTokenAuthorizer) Middleware(w http.ResponseWriter, r *http.Request, next http.Handler) {
- if authhdr := strings.Split(r.Header.Get("Authorization"), " "); len(authhdr) > 1 && (authhdr[0] == "OAuth2" || authhdr[0] == "Bearer") {
+ if ta.ctrl == nil {
+ // Not using a compatible (OIDC) login controller.
+ } else if authhdr := strings.Split(r.Header.Get("Authorization"), " "); len(authhdr) > 1 && (authhdr[0] == "OAuth2" || authhdr[0] == "Bearer") {
err := ta.registerToken(r.Context(), authhdr[1])
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list