Skip to content

Commit

Permalink
2.4.15rc2: avoid warnings on cache misses (regression from 2.4.15rc1)
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Nov 1, 2023
1 parent 6677500 commit 454e227
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
11/01/2023
- avoid warnings on cache misses (regression introduced in 2.4.15rc1)
- bump to 2.4.15rc2

10/31/2023
- add capability to seamlessly rollover OIDCCryptoPassphrase using a (temporary) 2nd value that holds the old one
- bump to 2.4.15rc1
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([mod_auth_openidc],[2.4.15rc1],[[email protected]])
AC_INIT([mod_auth_openidc],[2.4.15rc2],[[email protected]])

AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())

Expand Down
11 changes: 6 additions & 5 deletions src/cache/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,9 @@ apr_byte_t oidc_cache_get(request_rec *r, const char *section, const char *key,
}

/* see if it is any good */
if (cache_value == NULL) {
if ((encrypted != 1) || (cfg->crypto_passphrase.secret2 == NULL)) {
rc = FALSE;
goto out;
}
if ((cache_value == NULL) && (encrypted == 1)
&& (cfg->crypto_passphrase.secret2 != NULL)) {
oidc_debug(r, "2nd try with previous passphrase");
s_secret = cfg->crypto_passphrase.secret2;
s_key = oidc_cache_get_hashed_key(r, s_secret, key);
if (cfg->cache->get(r, section, s_key, &cache_value) == FALSE) {
Expand All @@ -325,6 +323,9 @@ apr_byte_t oidc_cache_get(request_rec *r, const char *section, const char *key,
}
}

if (cache_value == NULL)
goto out;

/* see if encryption is turned on */
if (encrypted == 0) {
*value = apr_pstrdup(r->pool, cache_value);
Expand Down

0 comments on commit 454e227

Please sign in to comment.