DO NOT REPLY [Bug 43753] - JkEnvVar and Limit of content length HTTP request POST

2008-01-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=43753.
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=43753





--- Additional Comments From [EMAIL PROTECTED]  2008-01-02 09:12 ---
No sorry, I have a permanently error without JKEnvVar : the version 1.2.26 is 
useless for me.

The HTTP error :
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=13
en lang=e
enheadtitle38 Object not found!/title
link rev=made href=mailto:[EMAIL PROTECTED]
style type=text/css!--/*--![CDATA[/*!--*/ 
body { color: #00; background-color: #FF; }
a:link { color: #CC; }
p, address {margin-left: 3em;}
span {font-size: smaller;}
/*]]*/--/style/headbody
h1
1b
Object not found!/h1
p

39
The requested URL was not found on this server.
23
The link on the
a 
href=97%0D%0Ahttp://www.***.com/paiement/commande.html;referring
page/a seems to be wrong or outdated. Please inform the author of
a href=5e%0D%0Ahttp://www.***.com/paiement/commande.html;that 
page/a
about the error.
2
9
/p
p
48
If you think this is a server error, please contact
the a href=mailto:[EMAIL PROTECTED]webmaster/a.
11
/p
h2Error 
21
404/h2
address
  a href=/
25
www.***.com/abr
9
  span
21
Wed Jan  2 16:39:11 2008br
71
Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7l DAV/2 PHP/5.2.1 
mod_jk/1.2.26/span
/address
1
0
/body/html

for the mod_jk.log, no bug found :
[Wed Jan 02 16:18:18 2008] [20325:2684415368] [info] init_jk::mod_jk.c (2825): 
mod_jk/1.2.26 
initialized

for Tomcat catalina.out :
2 janv. 2008 16:58:01 org.apache.jk.common.ChannelSocket processConnection
GRAVE: Error, processing connection
java.lang.IndexOutOfBoundsException
at java.io.BufferedInputStream.read(BufferedInputStream.java:306)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:685)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java.lang.Thread.run(Thread.java:613)
2 janv. 2008 16:58:02 org.apache.jk.common.MsgAjp processHeader
GRAVE: BAD packet signature 18245

the call of this page is a script PHP (it work with mod_jk 1.2.25 without 
JKEnvVar):
function locationPost($host,$uri,$data){
$header  = 'POST http://'.$host.$uri.' HTTP/1.1'.\r\n;
$header .= 'Host: '.$host. \r\n;
$header .= 'User-Agent: '.$_SERVER['HTTP_USER_AGENT']. \r\n;
$header .= 'Referer: '.$_SERVER['HTTP_REFERER']. \r\n;
$header .= 'Content-Type: application/x-www-form-urlencoded'.\r\n;
$header .= 'Content-Length: '.strlen($data).\r\n;
$header .= 'Connection: close'.\r\n\r\n;

$socket = fsockopen($host,80,$errno,$errstr);
if(!$socket) return 'strongError '.$errno.'/strong '.$errstr;
$header .= $data;
fputs($socket,$header);
$response='';
while(!feof($socket)) $response.= fgets($socket, 4096);
fclose($socket);
return strstr($response,'');
}

if(count($_POST)0){
  $data = ;
  foreach($_POST as $key=$val) {
  if(!empty($data)) $data.= '';
  $data.= $key.=.urlencode($val);
  }
echo 
locationPost($_SERVER['HTTP_HOST'],'/servlet/CyberplusRequest',$data);
exit;
}





-- 
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 43753] - JkEnvVar and Limit of content length HTTP request POST

2008-01-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=43753.
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=43753





--- Additional Comments From [EMAIL PROTECTED]  2008-01-02 09:39 ---
Could you please give us a little basic information:

- version of Tomcat
- Operating system for httpd and for tomcat server
- JK directives used for httpd, workers.properties

Which URL do you use to produce the problem?
What result did you expect and what was wrong with the result you received?

(for example you started this with error 413, but now it seems you have a 
different problem?)

Please note: JkMounts do not get inhertited from the global server to virtual 
hosts. If you use virtual hosts, please also give the information, how those 
are structured, how they relate to your test case and your JK configuration.

If you can easily reproduce the problem with a single request, you can log 
communication details between mod_jk and Tomcat by using JkLogLevel debug.

I interprete your last message as follows: the php script sends a POST request 
to another httpd/mod_jk and the response you get is the error page you included 
in your message. This error page looks like *not* coming from httpd but instead 
from the backend behind JK (which is what?). With debig JkLogLevel, we could 
more precisely see, if there is any problem between JK and the backend.

The backend error message you included looks a bit, like your backend is 
outdated?


-- 
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 44096] - Find invalid session object.

2008-01-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=44096.
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=44096





--- Additional Comments From [EMAIL PROTECTED]  2008-01-02 11:22 ---
No problem. Just don't do it again ;)

-- 
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: r608199 - in /tomcat/connectors/trunk/jk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml

2008-01-02 Thread rjung
Author: rjung
Date: Wed Jan  2 11:51:44 2008
New Revision: 608199

URL: http://svn.apache.org/viewvc?rev=608199view=rev
Log:
Improve XSS hardening of status worker.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

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?rev=608199r1=608198r2=608199view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Wed Jan  2 11:51:44 
2008
@@ -148,7 +148,7 @@
 
 #define JK_STATUS_WAIT_AFTER_UPDATE3
 #define JK_STATUS_REFRESH_DEF  10
-#define JK_STATUS_ESC_CHARS(?)
+#define JK_STATUS_ESC_CHARS(?\)
 
 #define JK_STATUS_HEAD ?xml version=\1.0\ 
encoding=\ISO-8859-1\?\n \
!DOCTYPE html PUBLIC 
\-//W3C//DTD XHTML 1.0 Transitional//EN\ \
@@ -247,6 +247,7 @@
 {
 status_worker_t *worker;
 
+char*query_string;
 jk_map_t*req_params;
 char*msg;
 
@@ -936,13 +937,6 @@
 
 JK_TRACE_ENTER(l);
 
-if (!jk_map_alloc((p-req_params))) {
-jk_log(l, JK_LOG_ERROR,
-   Status worker '%s' could not alloc map for request parameters,
-   w-name);
-JK_TRACE_EXIT(l);
-return JK_FALSE;
-}
 if (!s-query_string) {
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
@@ -951,15 +945,39 @@
 JK_TRACE_EXIT(l);
 return JK_TRUE;
 }
+
+p-query_string = jk_pool_strdup(s-pool, s-query_string);
+if (!p-query_string) {
+jk_log(l, JK_LOG_ERROR,
+   Status worker '%s' could not copy query string,
+   w-name);
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
+
+/* XXX We simply mask special chars n the query string with '@' to prevent 
cross site scripting */
+query = p-query_string;
+while ((query = strpbrk(query, JK_STATUS_ESC_CHARS)))
+query[0] = '@';
+
+if (!jk_map_alloc((p-req_params))) {
+jk_log(l, JK_LOG_ERROR,
+   Status worker '%s' could not alloc map for request parameters,
+   w-name);
+JK_TRACE_EXIT(l);
+return JK_FALSE;
+}
 m = p-req_params;
-query = jk_pool_strdup(s-pool, s-query_string);
+
+query = jk_pool_strdup(s-pool, p-query_string);
 if (!query) {
 jk_log(l, JK_LOG_ERROR,
-   Status worker '%s' could not copy string,
+   Status worker '%s' could not copy query string,
w-name);
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
+
 #ifdef _REENTRANT
 for (param = strtok_r(query, , lasts);
  param; param = strtok_r(NULL, , lasts)) {
@@ -977,14 +995,9 @@
 }
 value = strchr(key, '=');
 if (value) {
-char *off;
 *value = '\0';
 value++;
 /* XXX Depending on the params values, we might need to trim and decode */
-/* XXX For now we simply mask special chars with '@' to prevent cross code 
injection */
-off = value;
-while ((off = strpbrk(off, JK_STATUS_ESC_CHARS)))
-off[0] = '@';
 if (strlen(key)) {
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
@@ -3336,7 +3349,7 @@
 cmd == JK_STATUS_CMD_SHOW) 
 refresh  0) {
 jk_printf(s, \nmeta http-equiv=\Refresh\ 
content=\%d;url=%s?%s\,
-  refresh, s-req_uri, s-query_string);
+  refresh, s-req_uri, p-query_string);
 }
 if (w-css) {
 jk_putv(s, \nlink rel=\stylesheet\ type=\text/css\ 
href=\,
@@ -3362,7 +3375,7 @@
 if (cmd == JK_STATUS_CMD_LIST ||
 cmd == JK_STATUS_CMD_SHOW) {
 if (refresh  0) {
-const char *str = s-query_string;
+const char *str = p-query_string;
 char *buf = jk_pool_alloc(s-pool, sizeof(char *) * 
(strlen(str)+1));
 int result = 0;
 size_t scan = 0;

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=608199r1=608198r2=608199view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Wed Jan  2 
11:51:44 2008
@@ -44,6 +44,9 @@
   subsection name=Native
 changelog
  

DO NOT REPLY [Bug 44116] - Multiple JSESSIONID handling with overlapping domains does not work

2008-01-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=44116.
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=44116


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #21300|0   |1
is obsolete||




--- Additional Comments From [EMAIL PROTECTED]  2008-01-02 14:04 ---
Created an attachment (id=21338)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=21338action=view)
Alternative patch


-- 
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 44116] - Multiple JSESSIONID handling with overlapping domains does not work

2008-01-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=44116.
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=44116


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|NEEDINFO




--- Additional Comments From [EMAIL PROTECTED]  2008-01-02 14:06 ---
I made a small variation of your patch, which I attach to this issue.
The basic idea is the same, but it might copy a little less and also uses id_end
to move id_start forward, so we have to do a little less earching. Finally it
terminates at the earlier of ';' and ',' by using strpbrk.

If you have a good test case, could you do some testing of it? Feedback would be
nice.

If all goes well, we'll include this for 1.2.27.

-- 
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: r608303 - /tomcat/connectors/trunk/jk/native/common/ap_snprintf.h

2008-01-02 Thread rjung
Author: rjung
Date: Wed Jan  2 17:21:32 2008
New Revision: 608303

URL: http://svn.apache.org/viewvc?rev=608303view=rev
Log:
Tab police.

Modified:
tomcat/connectors/trunk/jk/native/common/ap_snprintf.h

Modified: tomcat/connectors/trunk/jk/native/common/ap_snprintf.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/ap_snprintf.h?rev=608303r1=608302r2=608303view=diff
==
--- tomcat/connectors/trunk/jk/native/common/ap_snprintf.h (original)
+++ tomcat/connectors/trunk/jk/native/common/ap_snprintf.h Wed Jan  2 17:21:32 
2008
@@ -67,8 +67,8 @@
 /* ap_vformatter() is a generic printf-style formatting routine
  * with some extensions.  The extensions are:
  *
- * %pA takes a struct in_addr *, and prints it as a.b.c.d
- * %pI takes a struct sockaddr_in * and prints it as a.b.c.d:port
+ * %pA  takes a struct in_addr *, and prints it as a.b.c.d
+ * %pI  takes a struct sockaddr_in * and prints it as a.b.c.d:port
  * %pp  takes a void * and outputs it in hex
  *
  * The %p hacks are to force gcc's printf warning code to skip
@@ -147,4 +147,4 @@
 }
 #endif
 
-#endif /* !APACHE_AP_SNPRINTF_H */
+#endif  /* !APACHE_AP_SNPRINTF_H */



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



RE: [ANN] Apache Tomcat JK 1.2.26 Web Server Connector released

2008-01-02 Thread Tim Whittington
Binary builds of 1.2.26 for various platforms are available now from
http://sourceforge.net/projects/timsjk/
These include builds of a patched IIS 5/6 ISAPI Redirector that support
HTTP 1.1 chunked encoding (and thus keep-alives on dynamic content).

cheers
tim


-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 25 December 2007 4:36 a.m.
To: [EMAIL PROTECTED]; dev@tomcat.apache.org; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [ANN] Apache Tomcat JK 1.2.26 Web Server Connector released

The Apache Tomcat team is pleased to announce the immediate availability
of version 1.2.26 of the Apache Tomcat Connectors.

It contains connectors, which allow a web server such as Apache HTTPD,
Microsoft IIS and Sun Web Server to act as a front end to the Tomcat web
application server.

This version contains a few enhancements and fixes a number of minor bugs
of the previous versions.

See http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html
for a complete list of changes.

Source distribtions can be downloaded from an Apache Software Foundation
mirror at:

http://tomcat.apache.org/download-connectors.cgi

Binary distributions for a number of different operating systems and web
servers can be downloaded from an Apache Software Foundation mirror at:

http://tomcat.apache.org/download-connectors.cgi

Syncing the release to the download mirrors might take up to 48 hours.

Documentation for using Apache Tomcat Connectors can be found at:

http://tomcat.apache.org/connectors-doc/

Thank you,

-- The Apache Tomcat Team

P.S.: Merry Christmas!



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



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



svn commit: r608313 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-01-02 Thread funkman
Author: funkman
Date: Wed Jan  2 18:46:52 2008
New Revision: 608313

URL: http://svn.apache.org/viewvc?rev=608313view=rev
Log:
some votes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=608313r1=608312r2=608313view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan  2 18:46:52 2008
@@ -52,25 +52,25 @@
   Include user principal if possible when serializing / de-serializing
   http://svn.apache.org/viewvc?rev=607596view=rev
   http://svn.apache.org/viewvc?rev=607597view=rev
-  +1: markt
+  +1: markt, funkman
   -1:
 
 * Improve Jasper docs. Note rather than remove unused option, it will be
   deprecated in 6.0.x.
   http://svn.apache.org/viewvc?rev=607860view=rev
-  +1: markt
+  +1: markt, funkman
   -1: 
 
 * Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43800
   Make link between APR and Native clearer
   http://svn.apache.org/viewvc?rev=607875view=rev
-  +1: markt
+  +1: markt, funkman
   -1:
 
   Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43775
   Don't change line endings for binary files
   http://svn.apache.org/viewvc?rev=607888view=rev
-  +1: markt
+  +1: markt, funkman
   -1:
 
   Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43758



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



svn commit: r608329 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-01-02 Thread fhanik
Author: fhanik
Date: Wed Jan  2 19:27:06 2008
New Revision: 608329

URL: http://svn.apache.org/viewvc?rev=608329view=rev
Log:
cast vote

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=608329r1=608328r2=608329view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan  2 19:27:06 2008
@@ -53,7 +53,7 @@
   http://svn.apache.org/viewvc?rev=607596view=rev
   http://svn.apache.org/viewvc?rev=607597view=rev
   +1: markt, funkman
-  -1:
+  -1: fhanik - lets not do e.printStackTrace, handle the error and log it 
correctly, also, have the diff only change lines that are actually changed. 
makes it easier to review
 
 * Improve Jasper docs. Note rather than remove unused option, it will be
   deprecated in 6.0.x.



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