mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
PR56052: resolve problems with expired sessions
session_load providers cache the session_rec pointer, so hollow them out and reuse them instead of replacing them. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1874673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,6 +1,9 @@
|
|||||||
-*- coding: utf-8 -*-
|
-*- coding: utf-8 -*-
|
||||||
Changes with Apache 2.5.1
|
Changes with Apache 2.5.1
|
||||||
|
|
||||||
|
*) mod_session: Fix an issue that blocked new sessions being created after
|
||||||
|
session expiration or other session errors. PR56052 [Eric Covener]
|
||||||
|
|
||||||
*) mod_proxy_hcheck: Allow healthcheck expressions to use %{Content-Type}.
|
*) mod_proxy_hcheck: Allow healthcheck expressions to use %{Content-Type}.
|
||||||
PR64140. [Renier Velazco <renier.velazco upr.edu>]
|
PR64140. [Renier Velazco <renier.velazco upr.edu>]
|
||||||
|
|
||||||
|
@@ -137,23 +137,22 @@ static apr_status_t ap_session_load(request_rec * r, session_rec ** z)
|
|||||||
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01817)
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01817)
|
||||||
"error while decoding the session, "
|
"error while decoding the session, "
|
||||||
"session not loaded: %s", r->uri);
|
"session not loaded: %s", r->uri);
|
||||||
zz = NULL;
|
/* preserve pointers to zz in load/save providers */
|
||||||
|
memset(zz, 0, sizeof(session_rec));
|
||||||
|
zz->pool = r->pool;
|
||||||
|
zz->entries = apr_table_make(zz->pool, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* invalidate session if session is expired */
|
/* invalidate session if session is expired */
|
||||||
if (zz && zz->expiry && zz->expiry < now) {
|
if (zz && zz->expiry && zz->expiry < now) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "session is expired");
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "session is expired");
|
||||||
zz = NULL;
|
/* preserve pointers to zz in load/save providers */
|
||||||
|
memset(zz, 0, sizeof(session_rec));
|
||||||
|
zz->pool = r->pool;
|
||||||
|
zz->entries = apr_table_make(zz->pool, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no luck, create a blank session */
|
|
||||||
if (!zz) {
|
|
||||||
zz = (session_rec *) apr_pcalloc(r->pool, sizeof(session_rec));
|
|
||||||
zz->pool = r->pool;
|
|
||||||
zz->entries = apr_table_make(zz->pool, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* make sure the expiry and maxage are set, if present */
|
/* make sure the expiry and maxage are set, if present */
|
||||||
if (dconf->maxage) {
|
if (dconf->maxage) {
|
||||||
if (!zz->expiry) {
|
if (!zz->expiry) {
|
||||||
|
Reference in New Issue
Block a user