You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hw...@apache.org on 2019/01/10 15:52:32 UTC
svn commit: r1850947 - in /httpd/httpd/trunk: CHANGES
modules/session/mod_session.c
Author: hwibell
Date: Thu Jan 10 15:52:31 2019
New Revision: 1850947
URL: http://svn.apache.org/viewvc?rev=1850947&view=rev
Log:
Always decode session attributes early.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/session/mod_session.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1850947&r1=1850946&r2=1850947&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Jan 10 15:52:31 2019
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.1
+ *) mod_session: Always decode session attributes early. [Hank Ibell]
+
*) core: Incorrect values for environment variables are substituted when
multiple environment variables are specified in a directive. [Hank Ibell]
Modified: httpd/httpd/trunk/modules/session/mod_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session.c?rev=1850947&r1=1850946&r2=1850947&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/mod_session.c (original)
+++ httpd/httpd/trunk/modules/session/mod_session.c Thu Jan 10 15:52:31 2019
@@ -126,20 +126,23 @@ static apr_status_t ap_session_load(requ
/* found a session that hasn't expired? */
now = apr_time_now();
+
if (zz) {
- if (zz->expiry && zz->expiry < now) {
+ /* load the session attibutes */
+ rv = ap_run_session_decode(r, zz);
+
+ /* having a session we cannot decode is just as good as having
+ none at all */
+ if (OK != rv) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01817)
+ "error while decoding the session, "
+ "session not loaded: %s", r->uri);
zz = NULL;
}
- else {
- /* having a session we cannot decode is just as good as having
- none at all */
- rv = ap_run_session_decode(r, zz);
- if (OK != rv) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01817)
- "error while decoding the session, "
- "session not loaded: %s", r->uri);
- zz = NULL;
- }
+
+ /* invalidate session if session is expired */
+ if (zz && zz->expiry && zz->expiry < now) {
+ zz = NULL;
}
}