Skip to content

Commit

Permalink
2.4.14.3rc6: fix continuous updating of session cookie
Browse files Browse the repository at this point in the history
introduced in 2.4.14.3rc5 with a057645

Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Aug 16, 2023
1 parent 4eebd5b commit 7db010d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
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.14.3rc5],[[email protected]])
AC_INIT([mod_auth_openidc],[2.4.14.3rc6],[[email protected]])

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

Expand Down
11 changes: 2 additions & 9 deletions src/mod_auth_openidc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1221,8 +1221,6 @@ static apr_byte_t oidc_refresh_claims_from_userinfo_endpoint(request_rec *r,
const char *access_token = NULL;
char *userinfo_jwt = NULL;

*needs_save = FALSE;

/* get the current provider info */
if (oidc_get_provider_from_session(r, cfg, session, &provider) == FALSE) {
*needs_save = TRUE;
Expand Down Expand Up @@ -1714,8 +1712,6 @@ static int oidc_handle_existing_session(request_rec *r, oidc_cfg *cfg,
}
}

*needs_save |= rv;

/* set the user authentication HTTP header if set and required */
if ((r->user != NULL) && (authn_header != NULL))
oidc_util_hdr_in_set(r, authn_header, r->user);
Expand Down Expand Up @@ -3966,11 +3962,8 @@ static int oidc_handle_info_request(request_rec *r, oidc_cfg *c,
* side-effect is that this may refresh the access token if not already done
* note that OIDCUserInfoRefreshInterval should be set to control the refresh policy
*/
if (b_extend_session) {
apr_byte_t l_needs_save = FALSE;
oidc_refresh_claims_from_userinfo_endpoint(r, c, session, &l_needs_save);
needs_save |= l_needs_save;
}
if (b_extend_session)
oidc_refresh_claims_from_userinfo_endpoint(r, c, session, &needs_save);

/* include the access token in the session info */
if (apr_hash_get(c->info_hook_data, OIDC_HOOK_INFO_ACCES_TOKEN,
Expand Down
2 changes: 1 addition & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -3205,7 +3205,7 @@ const char* oidc_util_jq_filter(request_rec *r, const char *input,
apr_time_now() + apr_time_from_sec(ttl));
}

end:
end:

if (parser)
jv_parser_free(parser);
Expand Down

0 comments on commit 7db010d

Please sign in to comment.