]> granicus.if.org Git - apache/commitdiff
Change the directives within the mod_session* modules to be valid
authorGraham Leggett <minfrin@apache.org>
Wed, 9 Apr 2008 12:39:33 +0000 (12:39 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 9 Apr 2008 12:39:33 +0000 (12:39 +0000)
both inside and outside the location/directory sections, as suggested
by wrowe.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646304 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/mod_session.xml
docs/manual/mod/mod_session_cookie.xml
docs/manual/mod/mod_session_crypto.xml
docs/manual/mod/mod_session_dbd.xml
modules/session/mod_session.c
modules/session/mod_session_cookie.c
modules/session/mod_session_dbd.c

diff --git a/CHANGES b/CHANGES
index 86700ea5fe37e9897fddf4e9a80afbd7dd2a76bc..28d019d9318ccb69d2ffe2ab204d233e1a0a6ad9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) Change the directives within the mod_session* modules to be valid
+     both inside and outside the location/directory sections, as
+     suggested by wrowe. [Graham Leggett]
+
   *) mod_auth_form: Add a module capable of allowing end users to log
      in using an HTML form, storing the credentials within mod_session.
      [Graham Leggett]
index 205b95ce3bba5202ea914ae908b27355c727d1d5..0567c2ae6321ddd9fab23af3870fb9c35b8d2d8d 100644 (file)
 <description>Enables a session for the current directory or location</description>
 <syntax>Session On|Off</syntax>
 <default>Session Off</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Define a maximum age in seconds for a session</description>
 <syntax>SessionMaxAge <var>maxage</var></syntax>
 <default>SessionMaxAge 0</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <var>HTTP_SESSION</var> environment variable</description>
 <syntax>SessionEnv On|Off</syntax>
 <default>SessionEnv Off</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Import session updates from a given HTTP response header</description>
 <syntax>SessionHeader <var>header</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Define URL prefixes for which a session is valid</description>
 <syntax>SessionInclude <var>path</var></syntax>
 <default>all URLs</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Define URL prefixes for which a session is ignored</description>
 <syntax>SessionExclude <var>path</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
index b896f99ca3eeb7095119a35c80294b1306b6c440..3abcdebde2f6f9f2e5dfc7f1f66995cc10f28ee2 100644 (file)
 <description>Name and attributes for the RFC2109 cookie storing the session</description>
 <syntax>SessionCookieName <var>name</var> <var>attributes</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Name and attributes for the RFC2965 cookie storing the session</description>
 <syntax>SessionCookieName2 <var>name</var> <var>attributes</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Control for whether session cookies should be removed from incoming HTTP headers</description>
 <syntax>SessionCookieRemove On|Off</syntax>
 <default>SessionCookieRemove Off</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
index eea4c21b6a28280ebeb0c550b75268f182522a61..d6437e9f2e3e4722fa9fb268503883be37fa95d1 100644 (file)
 <description>The key used to encrypt the session</description>
 <syntax>SessionCryptoPassphrase <var>secret</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The certificate used to encrypt and decrypt the session</description>
 <syntax>SessionCryptoCertificateFile <var>file</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The certificate key used to encrypt and decrypt the session</description>
 <syntax>SessionCryptoCertificateKeyFile <var>file</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The name of the cipher to use during encryption / decryption</description>
 <syntax>SessionCryptoCipher <var>cipher</var></syntax>
 <default>AES256</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The name of the digest to use during encryption / decryption</description>
 <syntax>SessionCryptoDigest <var>cipher</var></syntax>
 <default>SHA</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The name of the engine to use during encryption / decryption</description>
 <syntax>SessionCryptoEngine <var>engine</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
index 3350c1d1743d0d5cd36a8b2ce44ebd5ed802db75..c8be1dd85d44d4d520ede2145f7cfa5290ec7afc 100644 (file)
 <description>Name and attributes for the RFC2109 cookie storing the session ID</description>
 <syntax>SessionDBDCookieName <var>name</var> <var>attributes</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Name and attributes for the RFC2965 cookie storing the session ID</description>
 <syntax>SessionDBDCookieName2 <var>name</var> <var>attributes</var></syntax>
 <default>none</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Control for whether session ID cookies should be removed from incoming HTTP headers</description>
 <syntax>SessionDBDCookieRemove On|Off</syntax>
 <default>SessionDBDCookieRemove On</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>Enable a per user session</description>
 <syntax>SessionDBDPerUser On|Off</syntax>
 <default>SessionDBDPerUser Off</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The SQL query to use to select sessions from the database</description>
 <syntax>SessionDBDSelectLabel <var>label</var></syntax>
 <default>SessionDBDSelectLabel selectsession</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The SQL query to use to insert sessions into the database</description>
 <syntax>SessionDBDInsertLabel <var>label</var></syntax>
 <default>SessionDBDInsertLabel insertsession</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The SQL query to use to update existing sessions in the database</description>
 <syntax>SessionDBDUpdateLabel <var>label</var></syntax>
 <default>SessionDBDUpdateLabel updatesession</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
 <description>The SQL query to use to remove sessions from the database</description>
 <syntax>SessionDBDDeleteLabel <var>label</var></syntax>
 <default>SessionDBDDeleteLabel deletesession</default>
-<contextlist><context>directory</context>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
 </contextlist>
 <compatibility>Available in Apache 2.3.0 and later</compatibility>
 
index 9ff7362d369a05d87207bc3b2fa126137c7d1018..7b4988090970c306207dbb60c5a25bf1d93f2620 100644 (file)
@@ -582,17 +582,17 @@ static const char *add_session_exclude(cmd_parms * cmd, void *dconf, const char
 
 static const command_rec session_cmds[] =
 {
-    AP_INIT_FLAG("Session", set_session_enable, NULL, OR_AUTHCFG,
+    AP_INIT_FLAG("Session", set_session_enable, NULL, RSRC_CONF|OR_AUTHCFG,
                  "on if a session should be maintained for these URLs"),
-    AP_INIT_TAKE1("SessionMaxAge", set_session_maxage, NULL, OR_AUTHCFG,
+    AP_INIT_TAKE1("SessionMaxAge", set_session_maxage, NULL, RSRC_CONF|OR_AUTHCFG,
                   "length of time for which a session should be valid. Zero to disable"),
-    AP_INIT_TAKE1("SessionHeader", set_session_header, NULL, OR_AUTHCFG,
+    AP_INIT_TAKE1("SessionHeader", set_session_header, NULL, RSRC_CONF|OR_AUTHCFG,
                   "output header, if present, whose contents will be injected into the session."),
-    AP_INIT_FLAG("SessionEnv", set_session_env, NULL, OR_AUTHCFG,
+    AP_INIT_FLAG("SessionEnv", set_session_env, NULL, RSRC_CONF|OR_AUTHCFG,
                  "on if a session should be written to the CGI environment. Defaults to off"),
-    AP_INIT_TAKE1("SessionInclude", add_session_include, NULL, OR_AUTHCFG,
+    AP_INIT_TAKE1("SessionInclude", add_session_include, NULL, RSRC_CONF|OR_AUTHCFG,
                   "URL prefixes to include in the session. Defaults to all URLs"),
-    AP_INIT_TAKE1("SessionExclude", add_session_exclude, NULL, OR_AUTHCFG,
+    AP_INIT_TAKE1("SessionExclude", add_session_exclude, NULL, RSRC_CONF|OR_AUTHCFG,
                   "URL prefixes to exclude from the session. Defaults to no URLs"),
     {NULL}
 };
index caaa3d19dd83d6f8d8001bd1e5007e17945f684c..0eb0e597d4a4fc4881ecc986eac2b0d1cff3094c 100644 (file)
@@ -241,11 +241,11 @@ static const char *
 
 static const command_rec session_cookie_cmds[] =
 {
-    AP_INIT_RAW_ARGS("SessionCookieName", set_cookie_name, NULL, OR_AUTHCFG,
+    AP_INIT_RAW_ARGS("SessionCookieName", set_cookie_name, NULL, RSRC_CONF|OR_AUTHCFG,
                      "The name of the RFC2109 cookie carrying the session"),
-    AP_INIT_RAW_ARGS("SessionCookieName2", set_cookie_name2, NULL, OR_AUTHCFG,
+    AP_INIT_RAW_ARGS("SessionCookieName2", set_cookie_name2, NULL, RSRC_CONF|OR_AUTHCFG,
                      "The name of the RFC2965 cookie carrying the session"),
-    AP_INIT_FLAG("SessionCookieRemove", set_remove, NULL, OR_AUTHCFG,
+    AP_INIT_FLAG("SessionCookieRemove", set_remove, NULL, RSRC_CONF|OR_AUTHCFG,
                  "Set to 'On' to remove the session cookie from the headers "
                  "and hide the cookie from a backend server or process"),
     {NULL}
index 520ecccb0679c35c4b58114841de4b47adafbc7f..87693b0072b7ea6f4d87507f81f423006adef0d7 100644 (file)
@@ -591,24 +591,24 @@ static const char *set_cookie_name2(cmd_parms * cmd, void *config, const char *a
 static const command_rec session_dbd_cmds[] =
 {
     AP_INIT_TAKE1("SessionDBDSelectLabel", ap_set_string_slot,
-      (void *) APR_OFFSETOF(session_dbd_dir_conf, selectlabel), OR_AUTHCFG,
+      (void *) APR_OFFSETOF(session_dbd_dir_conf, selectlabel), RSRC_CONF|OR_AUTHCFG,
                   "Query label used to select a new session"),
     AP_INIT_TAKE1("SessionDBDInsertLabel", ap_set_string_slot,
-      (void *) APR_OFFSETOF(session_dbd_dir_conf, insertlabel), OR_AUTHCFG,
+      (void *) APR_OFFSETOF(session_dbd_dir_conf, insertlabel), RSRC_CONF|OR_AUTHCFG,
                   "Query label used to insert a new session"),
     AP_INIT_TAKE1("SessionDBDUpdateLabel", ap_set_string_slot,
-      (void *) APR_OFFSETOF(session_dbd_dir_conf, updatelabel), OR_AUTHCFG,
+      (void *) APR_OFFSETOF(session_dbd_dir_conf, updatelabel), RSRC_CONF|OR_AUTHCFG,
                   "Query label used to update an existing session"),
     AP_INIT_TAKE1("SessionDBDDeleteLabel", ap_set_string_slot,
-      (void *) APR_OFFSETOF(session_dbd_dir_conf, deletelabel), OR_AUTHCFG,
+      (void *) APR_OFFSETOF(session_dbd_dir_conf, deletelabel), RSRC_CONF|OR_AUTHCFG,
                   "Query label used to delete an existing session"),
-    AP_INIT_FLAG("SessionDBDPerUser", set_dbd_peruser, NULL, OR_AUTHCFG,
+    AP_INIT_FLAG("SessionDBDPerUser", set_dbd_peruser, NULL, RSRC_CONF|OR_AUTHCFG,
                  "Save the session per user"),
     AP_INIT_FLAG("SessionDBDCookieRemove", set_dbd_cookie_remove, NULL, RSRC_CONF|OR_AUTHCFG,
                  "Remove the session cookie after session load. On by default."),
-    AP_INIT_RAW_ARGS("SessionDBDCookieName", set_cookie_name, NULL, OR_AUTHCFG,
+    AP_INIT_RAW_ARGS("SessionDBDCookieName", set_cookie_name, NULL, RSRC_CONF|OR_AUTHCFG,
                  "The name of the RFC2109 cookie carrying the session key"),
-    AP_INIT_RAW_ARGS("SessionDBDCookieName2", set_cookie_name2, NULL, OR_AUTHCFG,
+    AP_INIT_RAW_ARGS("SessionDBDCookieName2", set_cookie_name2, NULL, RSRC_CONF|OR_AUTHCFG,
                  "The name of the RFC2965 cookie carrying the session key"),
     {NULL}
 };