mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Make sure we protect ourselves against the session being NULL, which it will be
if no session is configured. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645112 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -92,8 +92,10 @@ AP_DECLARE(void) ap_session_get(request_rec * r, session_rec * z, const char *ke
|
|||||||
if (!z) {
|
if (!z) {
|
||||||
ap_session_load(r, &z);
|
ap_session_load(r, &z);
|
||||||
}
|
}
|
||||||
|
if (z) {
|
||||||
*value = apr_table_get(z->entries, key);
|
*value = apr_table_get(z->entries, key);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a particular value to the session.
|
* Set a particular value to the session.
|
||||||
@@ -113,6 +115,7 @@ AP_DECLARE(void) ap_session_set(request_rec * r, session_rec * z,
|
|||||||
if (!z) {
|
if (!z) {
|
||||||
ap_session_load(r, &z);
|
ap_session_load(r, &z);
|
||||||
}
|
}
|
||||||
|
if (z) {
|
||||||
if (value) {
|
if (value) {
|
||||||
apr_table_set(z->entries, key, value);
|
apr_table_set(z->entries, key, value);
|
||||||
}
|
}
|
||||||
@@ -121,6 +124,7 @@ AP_DECLARE(void) ap_session_set(request_rec * r, session_rec * z,
|
|||||||
}
|
}
|
||||||
z->dirty = 1;
|
z->dirty = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the session.
|
* Load the session.
|
||||||
|
Reference in New Issue
Block a user