Skip to content

fix: read OIDC Prompt from the Prompt key, not the Ports key (#12557)#12559

Open
DeepDiver1975 wants to merge 1 commit into
masterfrom
fix/oidc-prompt-key-master
Open

fix: read OIDC Prompt from the Prompt key, not the Ports key (#12557)#12559
DeepDiver1975 wants to merge 1 commit into
masterfrom
fix/oidc-prompt-key-master

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #12557.

AppConfig::loadOpenIdConfigFromSystemConfig() read the OpenID Connect Prompt value from OidcPortsKey instead of OidcPromptKey. As a result, an administrator-provided Prompt in the system configuration ([OpenIDConnect] section / Windows registry) was ignored, and prompt was instead populated with the raw Ports string (e.g. "8080,8443"), which is not a valid OIDC prompt parameter. Since a valid system OIDC config fully replaces the theme config, the configured prompt was unreachable.

Changes

  • Read prompt from OidcPromptKey.
  • Add a regression test (testLoadOpenIdConfig) that exercises loadOpenIdConfigFromSystemConfig() and asserts prompt, ports, and scopes are each sourced from their own key.
  • Make loadOpenIdConfigFromSystemConfig() public (mirroring the existing configPath testing convention) so it is reachable from the test.
  • Add changelog entry.

Testing

AppConfigTest passes locally (4 passed, 0 failed). The new test fails before the fix (prompt would equal "8080,8443") and passes after.

Note

#12560 backports the same fix to the 7.1 branch.

🤖 Generated with Claude Code

@update-docs

update-docs Bot commented Jun 17, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

AppConfig::loadOpenIdConfigFromSystemConfig() read the OpenID Connect
Prompt value from OidcPortsKey instead of OidcPromptKey. As a result an
administrator-provided Prompt in the system configuration was ignored and
prompt was instead populated with the raw Ports string (e.g. "8080,8443"),
which is not a valid OIDC prompt parameter. Since a valid system OIDC
config fully replaces the theme config, the configured prompt was
unreachable.

Read prompt from OidcPromptKey, and add a regression test that exercises
loadOpenIdConfigFromSystemConfig() and asserts prompt, ports and scopes
are each sourced from their own key. The method is made public (mirroring
configPath) so it is reachable from the test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975 DeepDiver1975 force-pushed the fix/oidc-prompt-key-master branch from 4c072f8 to 8c92873 Compare June 17, 2026 22:04
@DeepDiver1975 DeepDiver1975 requested review from erikjv and modSpike June 18, 2026 21:30
* Load the OpenID Connect configuration from a system QSettings instance.
* @param system the system configuration settings
* @return An OpenIdConfig object populated from the [OpenIDConnect] section.
* @internal kept public for testing purposes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tests should rely on the original public interfaces only - I do not agree to making any of the internal "helper" functions public as they should never be called by any impl - that is why they are private. This is basic encapsulation.

please refactor your new test to use the appconfig instance only, as that is what is and should continue to be used in real life.

you should be able to essentially do the same thing wrt setting up the test values in a fake system config, then check the values on a resulting appConfig instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System config OIDC: Prompt is read from the Ports key instead of the Prompt key

2 participants