Author: kkolinko Date: Sat Feb 9 17:14:16 2013 New Revision: 1444396 URL: http://svn.apache.org/r1444396 Log: CTR: docs Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54080 Clarify documentation for initial value of internalProxies attribute of RemoteIpValve.
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml tomcat/tc6.0.x/trunk/webapps/docs/config/valve.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1444396&r1=1444395&r2=1444396&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Feb 9 17:14:16 2013 @@ -68,13 +68,6 @@ PATCHES PROPOSED TO BACKPORT: +1: kfujino, kkolinko, markt -1: -* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54080 - "Comma related bug in org.apache.catalina.valves.RemoteIpValve" - Documentation-only patch: - https://issues.apache.org/bugzilla/attachment.cgi?id=29545 - +1: schultz, markt - -1: - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54044 Correct bug in timestamp cache used by org.apache.juli.OneLineFormatter that meant entries could be made with an earlier timestamp than the true timestamp. Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java?rev=1444396&r1=1444395&r2=1444396&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java Sat Feb 9 17:14:16 2013 @@ -93,6 +93,11 @@ import org.apache.juli.logging.LogFactor * <td>RemoteIPInternalProxy</td> * <td>Comma delimited list of regular expressions (in the syntax supported by the {@link java.util.regex.Pattern} library)</td> * <td>10\.\d{1,3}\.\d{1,3}\.\d{1,3}, 192\.168\.\d{1,3}\.\d{1,3}, 169\.254\.\d{1,3}\.\d{1,3}, 127\.\d{1,3}\.\d{1,3}\.\d{1,3} <br/> + * Note that this comma-separated regular expression <i>is</i> used by default + * but cannot be specified in the same way through String-based configuration, + * as the commas in the "\d{1,3}" expressions will interpreted as separators + * between regular expressions. The "\d{1,3}" pattern can be replaced by + * "\d\d?\d?" or more simply by "\d+". * By default, 10/8, 192.168/16, 169.254/16 and 127/8 are allowed ; 172.16/12 has not been enabled by default because it is complex to * describe with regular expressions</td> * </tr> @@ -687,7 +692,10 @@ public class RemoteIpValve extends Valve * Comma delimited list of internal proxies. Can be expressed with regular expressions. * </p> * <p> - * Default value : 10\.\d{1,3}\.\d{1,3}\.\d{1,3}, 192\.168\.\d{1,3}\.\d{1,3}, 127\.\d{1,3}\.\d{1,3}\.\d{1,3} + * Default value: 10\.\d{1,3}\.\d{1,3}\.\d{1,3}, 192\.168\.\d{1,3}\.\d{1,3}, 127\.\d{1,3}\.\d{1,3}\.\d{1,3}<br/> + * Note: If you want to configure the same value, you have to replace + * "\d{1,3}" with "\d\d?\d?" or more simply with "\d+". Otherwise the commas + * in the expression will be mistaken for separators between regular expressions. * </p> */ public void setInternalProxies(String commaDelimitedInternalProxies) { Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1444396&r1=1444395&r2=1444396&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sat Feb 9 17:14:16 2013 @@ -91,6 +91,11 @@ <subsection name="Web applications"> <changelog> <fix> + <bug>54080</bug>: Clarify documentation for initial value of + <code>internalProxies</code> attribute of <code>RemoteIpValve</code>. + (schultz/kkolinko) + </fix> + <fix> <bug>54198</bug>: Clarify that <code>HttpServletResponse.sendError(int)</code> results in an HTML response by default. (markt) Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/valve.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/valve.xml?rev=1444396&r1=1444395&r2=1444396&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/config/valve.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/config/valve.xml Sat Feb 9 17:14:16 2013 @@ -860,9 +860,17 @@ expressions. If they appear in the <strong>remoteIpHeader</strong> value, they will be trusted and will not appear in the <strong>proxiesHeader</strong> value. If not specified the default value - of <code>10\.\d{1,3}\.\d{1,3}\.\d{1,3}, 192\.168\.\d{1,3}\.\d{1,3}, - 169\.254\.\d{1,3}\.\d{1,3}, 127\.\d{1,3}\.\d{1,3}\.\d{1,3}</code> will + of <code>10\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?, + 192\.168\.\d\d?\d?\.\d\d?\d?, + 169\.254\.\d\d?\d?\.\d\d?\d?, + 127\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?</code> will be used.</p> + <p> + Note that the individual regular expressions <i>must not</i> + contain commas themselves, as the <code>internalProxies</code> + value is first split by commas, then parsed into separate regular + expression patterns. + </p> </attribute> <attribute name="proxiesHeader" required="false"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org