DO NOT REPLY [Bug 41096] - security problem with javamail

2006-12-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41096.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41096


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2006-12-02 02:16 ---
(In reply to comment #1)
 Bugzilla is not a support forum. Please use the Tomcat users mailing list.

Sorry but javamail 1.4 is the only libs which seem to not works properly with
catalina/security model. Why this is a support problem?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r481553 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2006-12-02 Thread rjung
Author: rjung
Date: Sat Dec  2 04:31:10 2006
New Revision: 481553

URL: http://svn.apache.org/viewvc?view=revrev=481553
Log:
Replace - by _ in attribute name time-to-recover to
make naming compliant with ant nameing restrictions
(this helps for the jkstatus ant tasks).

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=481553r1=481552r2=481553
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec  2 04:31:10 
2006
@@ -972,7 +972,7 @@
 if (rs  lb-recover_wait_time - (int)difftime(now, 
wr-s-error_time))
 rs += lb-maintain_time;
 }
-jk_printf(s, time-to-recover=\%u\, rs  0 ? 0 : rs);
+jk_printf(s, time_to_recover=\%u\, rs  0 ? 0 : rs);
 /* Terminate the tag */
 jk_puts(s, /\n);
 }
@@ -1104,7 +1104,7 @@
 if (rs  lb-recover_wait_time - (int)difftime(now, 
wr-s-error_time))
 rs += lb-maintain_time;
 }
-jk_printf(s,  time-to-recover=%u\n, rs  0 ? 0 : rs);
+jk_printf(s,  time_to_recover=%u\n, rs  0 ? 0 : rs);
 }
 }
 else if (aw) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r481556 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2006-12-02 Thread rjung
Author: rjung
Date: Sat Dec  2 05:14:02 2006
New Revision: 481556

URL: http://svn.apache.org/viewvc?view=revrev=481556
Log:
Changing return type of argument passing in status worker
to a three value type (JK_TRUE, JK_FALSE and JK_UNSET).
JK_UNSET is used to distinguish an empty parameter from
a missing one.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=481556r1=481555r2=481556
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec  2 05:14:02 
2006
@@ -342,7 +342,7 @@
 return True;
 }
 
-static char *status_get_arg_raw(const char *param, const char *req, char *buf, 
size_t len)
+static int status_get_arg_raw(const char *param, const char *req, char *buf, 
size_t len)
 {
 char ps[32];
 char *p;
@@ -350,9 +350,9 @@
 
 *buf = '\0';
 if (!req)
-return NULL;
+return JK_FALSE;
 if (!param)
-return NULL;
+return JK_FALSE;
 sprintf(ps, %s=, param);
 p = strstr(req, ps);
 if (!p) {
@@ -373,23 +373,25 @@
 }
 buf[l] = '\0';
 if (l)
-return buf;
+return JK_TRUE;
 else
-return NULL;
+return JK_UNSET;
 }
 else
-return NULL;
+return JK_FALSE;
 }
 
-static const char *status_get_arg(const char *param, const char *req, char 
*buf, size_t len)
+static int status_get_arg(const char *param, const char *req, char *buf, 
size_t len)
 {
-if (status_get_arg_raw(param, req, buf, len)) {
+int rv;
+
+rv = status_get_arg_raw(param, req, buf, len);
+if (rv == JK_TRUE) {
 char *off = buf;
 while ((off = strpbrk(off, JK_STATUS_ESC_CHARS)))
 off[0] = '@';
-return buf;
 }
-return NULL;
+return rv;
 }
 
 static int status_get_int(const char *param, const char *req, int def)
@@ -397,7 +399,7 @@
 char buf[32];
 int rv = def;
 
-if (status_get_arg_raw(param, req, buf, sizeof(buf) -1)) {
+if (status_get_arg_raw(param, req, buf, sizeof(buf)) == JK_TRUE) {
 rv = atoi(buf);
 }
 return rv;
@@ -408,7 +410,7 @@
 char buf[32];
 int rv = def;
 
-if (status_get_arg_raw(param, req, buf, sizeof(buf))) {
+if (status_get_arg_raw(param, req, buf, sizeof(buf)) == JK_TRUE) {
 if (strcasecmp(buf, on) == 0 ||
 strcasecmp(buf, true) == 0 ||
 strcasecmp(buf, 1) == 0)
@@ -549,16 +551,16 @@
 *refresh = 0;
 if (!s-query_string)
 return;
-if (status_get_arg_raw(JK_STATUS_ARG_CMD, s-query_string, buf, 
sizeof(buf)))
+if (status_get_arg_raw(JK_STATUS_ARG_CMD, s-query_string, buf, 
sizeof(buf)) == JK_TRUE)
 *cmd = status_cmd_int(buf);
-if (status_get_arg_raw(JK_STATUS_ARG_MIME, s-query_string, buf, 
sizeof(buf)))
+if (status_get_arg_raw(JK_STATUS_ARG_MIME, s-query_string, buf, 
sizeof(buf)) == JK_TRUE)
 *mime = status_mime_int(buf);
-if (status_get_arg_raw(JK_STATUS_ARG_FROM, s-query_string, buf, 
sizeof(buf)))
+if (status_get_arg_raw(JK_STATUS_ARG_FROM, s-query_string, buf, 
sizeof(buf)) == JK_TRUE)
 *from = status_cmd_int(buf);
 *refresh = status_get_int(JK_STATUS_ARG_REFRESH, s-query_string, 0);
-if (status_get_arg(JK_STATUS_ARG_WORKER, s-query_string, buf, 
sizeof(buf)))
+if (status_get_arg(JK_STATUS_ARG_WORKER, s-query_string, buf, 
sizeof(buf)) == JK_TRUE)
 strncpy(worker, buf, JK_SHM_STR_SIZ);
-if (status_get_arg(JK_STATUS_ARG_WORKER_MEMBER, s-query_string, buf, 
sizeof(buf)))
+if (status_get_arg(JK_STATUS_ARG_WORKER_MEMBER, s-query_string, buf, 
sizeof(buf)) == JK_TRUE)
 strncpy(sub_worker, buf, JK_SHM_STR_SIZ);
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
@@ -1553,6 +1555,7 @@
 {
 char buf[128];
 int rc = 0;
+int rv;
 int i;
 
 JK_TRACE_ENTER(l);
@@ -1580,8 +1583,8 @@
 /* Recalculate the load multiplicators wrt. lb_factor */
 rc |= 2;
 }
-if (status_get_arg(JK_STATUS_ARG_LBM_ROUTE,
-   s-query_string, buf, sizeof(buf))) {
+if ((rv = status_get_arg(JK_STATUS_ARG_LBM_ROUTE,
+ s-query_string, buf, sizeof(buf))) == JK_TRUE) {
 if (strncmp(wr-s-jvm_route, buf, JK_SHM_STR_SIZ)) {
 jk_log(l, JK_LOG_INFO,
setting 'jvm_route' for sub worker '%s' of lb worker '%s' 
to '%s',
@@ -1597,14 +1600,14 @@
 }
 }
 }
-else {
+else if (rv == JK_UNSET) {
 jk_log(l, JK_LOG_INFO,
resetting 'jvm_route' for sub worker '%s' of lb worker '%s',
wr-s-name, worker);
 memset(wr-s-jvm_route, 0, JK_SHM_STR_SIZ);
  

svn commit: r481557 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2006-12-02 Thread mturk
Author: mturk
Date: Sat Dec  2 05:21:05 2006
New Revision: 481557

URL: http://svn.apache.org/viewvc?view=revrev=481557
Log:
Remove implicit p tag (according to the html tidy).

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diffrev=481557r1=481556r2=481557
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Dec  2 05:21:05 
2006
@@ -739,7 +739,7 @@
 status_write_uri(s, R, JK_STATUS_CMD_RESET,
  0, from, refresh, name, NULL);
 jk_puts(s, ]nbsp;nbsp;);
-jk_putv(s, Worker Status for , name, h3/\n, NULL);
+jk_putv(s, Worker Status for , name, /h3\n, NULL);
 jk_putv(s, tabletr
 thType/thth, JK_STATUS_ARG_LB_TEXT_STICKY, /th
 th, JK_STATUS_ARG_LB_TEXT_STICKY_FORCE, /th
@@ -781,7 +781,7 @@
 jk_printf(s, td%d/td, lb-s-busy);
 jk_printf(s, td%d/td, lb-s-max_busy);
 jk_puts(s, /tr\n/table\nbr/\n);
-jk_puts(s, ph4Balancer Members/h4/p\n);
+jk_puts(s, h4Balancer Members/h4\n);
 jk_putv(s, tabletr
 thnbsp;/ththName/ththType/th
 thHost/ththAddr/th



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41096] - security problem with javamail

2006-12-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41096.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41096


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-12-02 09:11 ---
99.9% of all security manager issues are configuration problems, not bugs. In
this case all the information provided points to a configuration issue, hence
the pointer to the users list.

Further, no information has been provided that would enable this issue to be
reproduced.

Finally, a quick test this morning shows, as expected, that with JavaMail in
shared/lib and the default catalina.security policy the only additional
permission required to send mail is:

grant codeBase file:${catalina.home}/webapps/bugs/- {
 permission java.net.SocketPermission mailhost:25, connect;
};

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41059] - WebAppClassLoader clearReferences code break running threads

2006-12-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41059.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41059


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|normal  |enhancement




--- Additional Comments From [EMAIL PROTECTED]  2006-12-02 09:12 ---
Just marking as an enhancement.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41072] - tomcat (3.x/4.x/5.x/6.x) is not supporting http(1.0/1.1) CONNECT method.

2006-12-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41072.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41072





--- Additional Comments From [EMAIL PROTECTED]  2006-12-02 09:27 ---
Hi Shankar Unni  
   I have already looked in to the connectors/http11Processor.java, i cound'd
find the implementation of http CONNECT method. Tomcat is not supporting
proxying directly. If possible can you send me some more details you have? 

Thanks in advance.
  

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41096] - security problem with javamail

2006-12-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41096.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41096





--- Additional Comments From [EMAIL PROTECTED]  2006-12-02 09:28 ---
Sorry, missed a permission. You also need:

grant codeBase file:${catalina.home}/shared/lib/- {
 permission java.net.SocketPermission mailhost:25, connect;
};

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41072] - tomcat (3.x/4.x/5.x/6.x) is not supporting http(1.0/1.1) CONNECT method.

2006-12-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41072.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41072





--- Additional Comments From [EMAIL PROTECTED]  2006-12-02 09:31 ---
Hi Shankar Unni  
   I have already looked in to the connectors/http11Processor.java, i could NOT
find the implementation of http CONNECT method. Tomcat is not supporting
proxying directly. If possible can you send me some more details you have? 

Thanks in advance.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r481614 - in /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf: B2CConverter.java Base64.java ByteChunk.java CharChunk.java StringCache.java UDecoder.java UEncoder.java

2006-12-02 Thread markt
Author: markt
Date: Sat Dec  2 12:04:21 2006
New Revision: 481614

URL: http://svn.apache.org/viewvc?view=revrev=481614
Log:
Code clean up in o.a.t.util.buf
- Remove unused code

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UEncoder.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java?view=diffrev=481614r1=481613r2=481614
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java 
Sat Dec  2 12:04:21 2006
@@ -183,8 +183,6 @@
  * 
  */
 final class  ReadConvertor extends InputStreamReader {
-// stream with flush() and close(). overriden.
-private IntermediateInputStream iis;
 
 // Has a private, internal byte[8192]
 
@@ -194,7 +192,6 @@
 throws UnsupportedEncodingException
 {
 super( in, enc );
-iis=in;
 }
 
 /** Overriden - will do nothing but reset internal state.

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java?view=diffrev=481614r1=481613r2=481614
==
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java 
Sat Dec  2 12:04:21 2006
@@ -42,7 +42,6 @@
 static private final int  TWENTYFOURBITGROUP = 24;
 static private final int  EIGHTBIT   = 8;
 static private final int  SIXTEENBIT = 16;
-static private final int  SIXBIT = 6;
 static private final int  FOURBYTE   = 4;
 
 

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java?view=diffrev=481614r1=481613r2=481614
==
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java 
Sat Dec  2 12:04:21 2006
@@ -112,7 +112,6 @@
 private ByteInputChannel in = null;
 private ByteOutputChannel out = null;
 
-private boolean isOutput=false;
 private boolean optimizedWrite=true;
 
 /**
@@ -156,7 +155,6 @@
 //  Setup 
 
 public void allocate( int initial, int limit  ) {
-isOutput=true;
 if( buff==null || buff.length  initial ) {
 buff=new byte[initial];
 }

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java?view=diffrev=481614r1=481613r2=481614
==
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java 
Sat Dec  2 12:04:21 2006
@@ -64,8 +64,6 @@
 
 private boolean isSet=false;  // XXX 
 
-private boolean isOutput=false;
-
 // -1: grow undefinitely
 // maximum amount to be cached
 private int limit=-1;
@@ -117,14 +115,12 @@
 //  Setup 
 
 public void allocate( int initial, int limit  ) {
-isOutput=true;
 if( buff==null || buff.length  initial ) {
 buff=new char[initial];
 }
 this.limit=limit;
 start=0;
 end=0;
-isOutput=true;
 isSet=true;
 }
 

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java?view=diffrev=481614r1=481613r2=481614
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java 
(original)
+++ 

svn commit: r481615 - in /tomcat: connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java container/tc5.5.x/webapps/docs/changelog.xml

2006-12-02 Thread markt
Author: markt
Date: Sat Dec  2 12:11:01 2006
New Revision: 481615

URL: http://svn.apache.org/viewvc?view=revrev=481615
Log:
Fix bug 41057. Port Remy's patch to limit the size of cached strings.

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java?view=diffrev=481615r1=481614r2=481615
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java 
Sat Dec  2 12:11:01 2006
@@ -55,6 +55,8 @@
 protected static int cacheSize = 
 
Integer.parseInt(System.getProperty(tomcat.util.buf.StringCache.cacheSize, 
200));
 
+protected static int maxStringSize = 
+
Integer.parseInt(System.getProperty(tomcat.util.buf.StringCache.maxStringSize,
 128));
 
 /**
  * Statistics hash map for byte chunk.
@@ -210,7 +212,7 @@
 // still training
 if (bcCache == null) {
 String value = bc.toStringInternal();
-if (byteEnabled) {
+if (byteEnabled  (value.length()  maxStringSize)) {
 // If training, everything is synced
 synchronized (bcStats) {
 // If the cache has been generated on a previous invocation
@@ -322,7 +324,7 @@
 // still training
 if (ccCache == null) {
 String value = cc.toStringInternal();
-if (charEnabled) {
+if (charEnabled  (value.length()  maxStringSize)) {
 // If training, everything is synced
 synchronized (ccStats) {
 // If the cache has been generated on a previous invocation

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diffrev=481615r1=481614r2=481615
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sat Dec  2 12:11:01 2006
@@ -153,6 +153,10 @@
 bug41017/bug: Restore behaviour of MessageBytes.setString(null).
 (remm/markt)
   /fix
+  fix
+bug41057/bug: Modify StringCache to add a configurable upper bound
+to the length of cached strings. (remm/markt)
+  /fix
 /changelog
   /subsection 
   subsection name=Jasper



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41057] - Tomcat leaks memory on every request

2006-12-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41057.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41057


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-12-02 12:12 ---
This has been fixed by Remy in SVN for 6.0.x and I have ported his fix to 5.5.x.

The fix will be included in 5.5.21 and 6.0.3 onwards.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]