mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix: check oidc / api config (#1940)
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/caos/logging"
|
||||
|
||||
"github.com/caos/zitadel/internal/crypto"
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
|
||||
"github.com/caos/zitadel/internal/project/model"
|
||||
)
|
||||
@@ -72,6 +73,9 @@ func (p *Project) appendChangeAPIConfigEvent(event *es_models.Event) error {
|
||||
}
|
||||
|
||||
if i, a := GetApplication(p.Applications, config.AppID); a != nil {
|
||||
if p.Applications[i].OIDCConfig == nil {
|
||||
return errors.ThrowInvalidArgument(nil, "MODEL-ADbsd", "api config is nil")
|
||||
}
|
||||
return p.Applications[i].APIConfig.setData(event)
|
||||
}
|
||||
return nil
|
||||
|
@@ -165,6 +165,9 @@ func (p *Project) appendChangeOIDCConfigEvent(event *es_models.Event) error {
|
||||
}
|
||||
|
||||
if i, a := GetApplication(p.Applications, config.AppID); a != nil {
|
||||
if p.Applications[i].OIDCConfig == nil {
|
||||
return errors.ThrowInvalidArgument(nil, "MODEL-aBR5G", "oidc config is nil")
|
||||
}
|
||||
return p.Applications[i].OIDCConfig.setData(event)
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user