You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2018/09/11 19:35:48 UTC

svn commit: r1840603 - in /tomcat/jk/trunk: native/iis/jk_isapi_plugin.c xdocs/miscellaneous/changelog.xml

Author: markt
Date: Tue Sep 11 19:35:47 2018
New Revision: 1840603

URL: http://svn.apache.org/viewvc?rev=1840603&view=rev
Log:
IIS: Improve path parameter handling so that strip_session can remove session IDs that are specified on path parameters in any segment of the URI rather than only the final segment.

Modified:
    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
    tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1840603&r1=1840602&r2=1840603&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Sep 11 19:35:47 2018
@@ -1750,10 +1750,10 @@ static DWORD handle_notify_event(PHTTP_F
         else
             query = NULL;
     }
-    if (uri_select_option == URI_SELECT_OPT_UNPARSED) {
-        /* Duplicate unparsed uri */
-        uri_undec = jk_pool_strdup(&pool, uri);
-    }
+
+    /* Duplicate unparsed uri */
+	uri_undec = jk_pool_strdup(&pool, uri);
+
     rc = unescape_url(uri);
     if (rc == BAD_REQUEST) {
         jk_log(logger, JK_LOG_ERROR,
@@ -1927,21 +1927,14 @@ static DWORD handle_notify_event(PHTTP_F
     }
     else {
         if (JK_IS_DEBUG_LEVEL(logger))
-            jk_log(logger, JK_LOG_DEBUG,
-                   "[%s] is not a servlet url", uri);
+            jk_log(logger, JK_LOG_DEBUG, "[%s] is not a servlet url", uri_undec);
         if (strip_session) {
-            char *jsessionid = strstr(uri, JK_PATH_SESSION_IDENTIFIER);
-            if (jsessionid) {
-                if (JK_IS_DEBUG_LEVEL(logger))
-                    jk_log(logger, JK_LOG_DEBUG,
-                           "removing session identifier [%s] for non servlet url [%s]",
-                           jsessionid, uri);
-                *jsessionid = '\0';
-                pfp->SetHeader(pfc, "url", uri);
-            }
+        	if (jk_strip_session_id(uri_undec, JK_PATH_SESSION_IDENTIFIER, logger)) {
+        		pfp->SetHeader(pfc, "url", uri_undec);
+        	}
         }
     }
-cleanup:
+cleanup:c
     jk_close_pool(&pool);
     return rv;
 }

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1840603&r1=1840602&r2=1840603&view=diff
==============================================================================
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Tue Sep 11 19:35:47 2018
@@ -67,6 +67,11 @@
         path parameters in any segment of the URI rather than only the final
         segment. (markt)
       </fix>
+      <fix>
+        IIS: Improve path parameter handling so that <code>strip_session</code>
+        can remove session IDs that are specified on path parameters in any
+        segment of the URI rather than only the final segment. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org