mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-15 10:25:11 +00:00
fix: prevent possible nil pointer panics (#11728)
# Which Problems Are Solved We found multiple cases where potentially a panic occurred or could occur: - when de/encrypting certain information - returning apps without any configuration type (?) - apple IdPs without a proper private key # How the Problems Are Solved - Added nil checks - Check private key format for apple IdPs - Added necessary helper function # Additional Changes Fixed i18n yaml where the IDP errors were indented under `org` instead of directly under `errors`. # Additional Context - requires backport to v4.x --------- Co-authored-by: Marco A. <[email protected]>
This commit is contained in:
@@ -38,7 +38,10 @@ func AppConfigToPb(app *query.App) app_pb.AppConfig {
|
||||
if app.SAMLConfig != nil {
|
||||
return AppSAMLConfigToPb(app.SAMLConfig)
|
||||
}
|
||||
return AppAPIConfigToPb(app.APIConfig)
|
||||
if app.APIConfig != nil {
|
||||
return AppAPIConfigToPb(app.APIConfig)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func AppOIDCConfigToPb(app *query.OIDCApp) *app_pb.App_OidcConfig {
|
||||
|
||||
Reference in New Issue
Block a user