Skip to content

Commit

Permalink
fix: return empty slice if requested_scope or audience is null
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Feb 5, 2024
1 parent 33950db commit 1a0567c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions consent/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,14 @@ func (h *Handler) getOAuth2LoginRequest(w http.ResponseWriter, r *http.Request,
return
}

if request.RequestedScope == nil {
request.RequestedScope = []string{}
}

if request.RequestedAudience == nil {
request.RequestedAudience = []string{}
}

request.Client = sanitizeClient(request.Client)
h.r.Writer().Write(w, r, request)
}
Expand Down

0 comments on commit 1a0567c

Please sign in to comment.