Skip to content

Commit 79fe980

Browse files
committed
fix merging top-level configured OIDCCryptoPassphrase into vhosts
that have not explicitly configured it; regression introduced in 2.4.19 Signed-off-by: Hans Zandbelt <[email protected]>
1 parent 81e8638 commit 79fe980

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
01/29/2026
2+
- fix merging top-level configured OIDCCryptoPassphrase into vhosts that have not explicitly configured it
3+
regression introduced in 2.4.19
4+
15
01/28/2026
26
- refresh: fix releasing the best effort distributed refresh lock immediately after refreshing
37
the access token fails to avoid parallel requests queuing up and blocking threads; also

src/cfg/cfg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ void *oidc_cfg_server_create(apr_pool_t *pool, server_rec *svr) {
783783
c->outgoing_proxy.username_password = NULL;
784784
c->outgoing_proxy.auth_type = OIDC_CONFIG_POS_INT_UNSET;
785785

786-
c->crypto_passphrase.secret1 = oidc_util_rand_hex_str(NULL, pool, 32);
786+
c->crypto_passphrase.secret1 = NULL;
787787
c->crypto_passphrase.secret2 = NULL;
788788

789789
c->post_preserve_template = NULL;

src/cfg/cfg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ void oidc_cfg_child_init(apr_pool_t *pool, oidc_cfg_t *cfg, server_rec *s);
196196
void oidc_cfg_process_cleanup(oidc_cfg_t *cfg, server_rec *s);
197197
const char *oidc_cfg_string_list_add(apr_pool_t *pool, apr_array_header_t **list, const char *arg);
198198
const char *oidc_cfg_endpoint_auth_set(apr_pool_t *pool, oidc_cfg_t *cfg, const char *arg, char **auth, char **alg);
199+
void oidc_cfg_crypto_passphrase_secret1_set(oidc_cfg_t *cfg, const char *secret);
199200

200201
#define OIDC_CFG_MEMBER_FUNC_NAME(member, type, method) oidc_##type##_##member##_##method
201202

src/mod_auth_openidc.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ void oidc_request_state_json_set(request_rec *r, const char *key, json_t *value)
412412
json_t *json = json_copy(value);
413413

414414
/* register a cleanup for the json object */
415-
apr_pool_cleanup_register(r->pool, json, (apr_status_t (*)(void *))json_decref, apr_pool_cleanup_null);
415+
apr_pool_cleanup_register(r->pool, json, (apr_status_t(*)(void *))json_decref, apr_pool_cleanup_null);
416416

417417
/* put the name/value pair in that hash table */
418418
apr_hash_set(state, key, APR_HASH_KEY_STRING, json);
@@ -1563,10 +1563,8 @@ static int oidc_config_check_vhost_config(apr_pool_t *pool, server_rec *s) {
15631563

15641564
oidc_sdebug(s, "enter");
15651565

1566-
if (oidc_cfg_crypto_passphrase_secret1_get(cfg) == NULL) {
1567-
oidc_serror(s, "'" OIDCCryptoPassphrase "' must be set");
1568-
return HTTP_INTERNAL_SERVER_ERROR;
1569-
}
1566+
if (oidc_cfg_crypto_passphrase_secret1_get(cfg) == NULL)
1567+
oidc_cfg_crypto_passphrase_secret1_set(cfg, oidc_util_rand_hex_str(NULL, s->process->pool, 32));
15701568

15711569
if ((oidc_cfg_metadata_dir_get(cfg) != NULL) ||
15721570
(oidc_cfg_provider_issuer_get(oidc_cfg_provider_get(cfg)) != NULL) ||

0 commit comments

Comments
 (0)