Commit 5a85ec52 authored by Hank Ibell's avatar Hank Ibell
Browse files

Always decode session attributes early.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1850947 13f79535-47bb-0310-9956-ffa450edef68
parent 7fa21ea6
Loading
Loading
Loading
Loading
+2 −0
Changes for CHANGES: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
                                                         -*- 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]

+8 −5
Changes for modules/session/mod_session.c: 8 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -126,20 +126,23 @@ static apr_status_t ap_session_load(request_rec * r, session_rec ** z)

    /* found a session that hasn't expired? */
    now = apr_time_now();

    if (zz) {
        if (zz->expiry && zz->expiry < now) {
            zz = NULL;
        }
        else {
        /* 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 */
            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;
        }
    }