Skip to content

Commit

Permalink
store timestamps in session in seconds; bump to 2.4.8.2
Browse files Browse the repository at this point in the history
to avoid string conversion problems on some (libapr-1) platform
build/run combinations, causing "maximum session duration exceeded"
errors

Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
  • Loading branch information
zandbelt committed May 8, 2021
1 parent c6917b5 commit 99ccd3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
05/08/2021
- store timestamps in session in seconds to avoid string conversion problems on some (libapr-1)
platform build/run combinations, causing "maximum session duration exceeded" errors
- bump to 2.4.8.2

05/07/2021
- add OIDCClientTokenEndpointKeyPassword option to allow the use of an encrypted private key
- release 2.4.8.1
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.8.1],[hans.zandbelt@zmartzone.eu])
AC_INIT([mod_auth_openidc],[2.4.8.2],[hans.zandbelt@zmartzone.eu])

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

Expand Down
4 changes: 2 additions & 2 deletions src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static void oidc_session_set_timestamp(request_rec *r, oidc_session_t *z,
const char *key, const apr_time_t timestamp) {
if (timestamp != -1)
oidc_session_set(r, z, key,
apr_psprintf(r->pool, "%" APR_TIME_T_FMT, timestamp));
apr_psprintf(r->pool, "%" APR_TIME_T_FMT, apr_time_sec(timestamp)));
}

static json_t *oidc_session_get_str2json(request_rec *r, oidc_session_t *z,
Expand All @@ -505,7 +505,7 @@ static apr_time_t oidc_session_get_key2timestamp(request_rec *r,
const char *s_expires = oidc_session_get_key2string(r, z, key);
if (s_expires != NULL)
sscanf(s_expires, "%" APR_TIME_T_FMT, &t_expires);
return t_expires;
return apr_time_from_sec(t_expires);
}

void oidc_session_set_filtered_claims(request_rec *r, oidc_session_t *z,
Expand Down

0 comments on commit 99ccd3c

Please sign in to comment.