mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
fix: panics (#2993)
* add missing return Signed-off-by: Livio Amstutz <livio.a@gmail.com> * add nil pointer check Signed-off-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
parent
6240dffc42
commit
3d14653a08
@ -23,6 +23,7 @@ func (l *Login) handleLoginSuccess(w http.ResponseWriter, r *http.Request) {
|
||||
authRequest, _ := l.getAuthRequest(r)
|
||||
if authRequest == nil {
|
||||
l.renderSuccessAndCallback(w, r, nil, nil)
|
||||
return
|
||||
}
|
||||
for _, step := range authRequest.PossibleSteps {
|
||||
if step.Type() != domain.NextStepLoginSucceeded && step.Type() != domain.NextStepRedirectToCallback {
|
||||
|
@ -70,7 +70,7 @@ func (l *Login) handleRegisterCheck(w http.ResponseWriter, r *http.Request) {
|
||||
resourceOwner := iam.GlobalOrgID
|
||||
memberRoles := []string{domain.RoleSelfManagementGlobal}
|
||||
|
||||
if authRequest.RequestedOrgID != "" && authRequest.RequestedOrgID != iam.GlobalOrgID {
|
||||
if authRequest != nil && authRequest.RequestedOrgID != "" && authRequest.RequestedOrgID != iam.GlobalOrgID {
|
||||
memberRoles = nil
|
||||
resourceOwner = authRequest.RequestedOrgID
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user