Author: jfrederic.clere(a)jboss.com
Date: 2012-01-25 08:21:00 -0500 (Wed, 25 Jan 2012)
New Revision: 1937
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Parameters.java
Log:
Control value addition to number of parameter.
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Parameters.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Parameters.java 2012-01-25
11:04:09 UTC (rev 1936)
+++
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Parameters.java 2012-01-25
13:21:00 UTC (rev 1937)
@@ -314,6 +314,8 @@
if (paramHashStringArray.containsKey(key)) {
String oldValues[] = (String[])paramHashStringArray.
get(key);
+ if (oldValues.length >=MAX_COUNT)
+ throw new IllegalStateException("Parameter values exceeded allowed
maximum: " + MAX_COUNT);
values = new String[oldValues.length + 1];
for (int i = 0; i < oldValues.length; i++) {
values[i] = oldValues[i];
Show replies by date