You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2014/01/20 22:01:16 UTC

svn commit: r1559828 - in /httpd/httpd/trunk: CHANGES modules/session/mod_session.c

Author: trawick
Date: Mon Jan 20 21:01:15 2014
New Revision: 1559828

URL: http://svn.apache.org/r1559828
Log:
mod_session: Fix problems interpreting the SessionInclude and
SessionExclude configuration.

PR: 56038
Submitted by: Erik Pearson <erik adaptations.com>
Reviewed by: trawick

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=1559828&r1=1559827&r2=1559828&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Jan 20 21:01:15 2014
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_session: Fix problems interpreting the SessionInclude and
+     SessionExclude configuration. PR 56038. [Erik Pearson
+     <erik adaptations.com>]
+
   *) mod_rewrite: Rename the handler that does per-directory internal 
      redirects to "rewrite-redirect-handler" from "redirect-handler" so
      it is less ambiguous and less likely to be reused. [Eric Covener]

Modified: httpd/httpd/trunk/modules/session/mod_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session.c?rev=1559828&r1=1559827&r2=1559828&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/mod_session.c (original)
+++ httpd/httpd/trunk/modules/session/mod_session.c Mon Jan 20 21:01:15 2014
@@ -62,16 +62,16 @@ static int session_included(request_rec 
         included = 0;
         for (i = 0; !included && i < conf->includes->nelts; i++) {
             const char *include = includes[i];
-            if (strncmp(r->uri, include, strlen(include))) {
+            if (strncmp(r->uri, include, strlen(include)) == 0) {
                 included = 1;
             }
         }
     }
 
     if (conf->excludes->nelts) {
-        for (i = 0; included && i < conf->includes->nelts; i++) {
+        for (i = 0; included && i < conf->excludes->nelts; i++) {
             const char *exclude = excludes[i];
-            if (strncmp(r->uri, exclude, strlen(exclude))) {
+            if (strncmp(r->uri, exclude, strlen(exclude)) == 0) {
                 included = 0;
             }
         }