indigo-dc / oidc-agent

oidc-agent for managing OpenID Connect tokens on the command line
MIT License
115 stars 30 forks source link

issuerConfig: do not segfault if there is no user-specific issuer config #601

Closed olifre closed 2 months ago

olifre commented 2 months ago

If no issuer.config is present in the config directory, content would be nullptr, and trigger a segmentation fault in updateIssuerConfigFileFormat. If there is no local configuration, there is nothing to update, so skip that.

Before this fix, versions >= 5.2.0 would segfault unless ~/.config/oidc-agent/issuer.config was present, i.e. all fresh installations are affected. As a quick hack, affected users can run:

mkdir -p ~/.config/oidc-agent
echo '{}' > ~/.config/oidc-agent/issuer.config