DO NOT REPLY [Bug 48640] New: file://localhost/C:/Users/angosso.com/Desktop/jk_isapi_plugin.c.patch

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48640

   Summary: file://localhost/C:/Users/angosso.com/Desktop/jk_isapi
_plugin.c.patch
   Product: Tomcat 6
   Version: 6.0.24
  Platform: PC
OS/Version: Windows Vista
Status: NEW
  Severity: normal
  Priority: P2
 Component: Servlet & JSP API
AssignedTo: dev@tomcat.apache.org
ReportedBy: mbiama.ekombitie@live.fr


Created an attachment (id=24908)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24908)
angosso@if (checkForAttachmentSupport) { //aviod testing and
possibly failing everytime. checkForAttachmentSupport = false; 
   try { // Attempt to 

/home/sites/angosso.com/public_html/jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c,v
file:${catalina.home}/webapps/angosso.com/public_html/WEB-INF/lib/driver.jar

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

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



DO NOT REPLY [Bug 48640] file://localhost/C:/Users/angosso.com/Desktop/jk_isapi_plugin.c.patch

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48640

Roger Mbiama Assogo  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
URL||/Home/sites/angosso.com/pub
   ||lic_html
 CC||mbiama.ekombitie@live.f
   ||r
 Resolution||FIXED
   Target Milestone|default |
   Severity|normal  |major

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

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



DO NOT REPLY [Bug 48640] file://localhost/C:/Users/angosso.com/Desktop/jk_isapi_plugin.c.patch

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48640

Rainer Jung  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

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

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



[Tomcat Wiki] Update of "PoweredBy" by RichardLingsch

2010-01-30 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "PoweredBy" page has been changed by RichardLingsch.
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=241&rev2=242

--

  
  === DreamShared ===
  {{http://www.dreamshared.com/site/images/v2/logo_no_bg.png}} 
[[http://www.dreamshared.com/|DreamShared]] uses Tomcat to help people design 
and host unique, stylish, custom business websites and wedding websites.
+ 
+ === eApps Hosting ===
+ {{http://www.eapps.com/images/header_logo.jpg}} [[http://www.eapps.com]] 
eApps Hosting has provided hosting for Java applications using Tomcat since 
2000 and now offers Tomcat hosting in a reliable, economical VPS container with 
24/7 support by in-house staff.
  
  === Energized Hosting ===
  [[http://www.energizedhosting.com|Energized Hosting]] uses Tomcat for its  
[[http://www.energizedhosting.com/hosting_jsp.html|Servlet/JSP hosting]] needs.

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



[Tomcat Wiki] Update of "PoweredBy" by RichardLingsch

2010-01-30 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "PoweredBy" page has been changed by RichardLingsch.
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=242&rev2=243

--

  {{http://www.dreamshared.com/site/images/v2/logo_no_bg.png}} 
[[http://www.dreamshared.com/|DreamShared]] uses Tomcat to help people design 
and host unique, stylish, custom business websites and wedding websites.
  
  === eApps Hosting ===
- {{http://www.eapps.com/images/header_logo.jpg}} [[http://www.eapps.com]] 
eApps Hosting has provided hosting for Java applications using Tomcat since 
2000 and now offers Tomcat hosting in a reliable, economical VPS container with 
24/7 support by in-house staff.
+ {{http://www.eapps.com/images/header_logo.jpg}} 
[[http://www.eapps.com/applications/tomcat-hosting.php]] eApps Hosting has 
provided hosting for Java applications using Tomcat since 2000 and now offers 
Tomcat hosting in a reliable, economical VPS container with 24/7 support by 
in-house staff.
  
  === Energized Hosting ===
  [[http://www.energizedhosting.com|Energized Hosting]] uses Tomcat for its  
[[http://www.energizedhosting.com/hosting_jsp.html|Servlet/JSP hosting]] needs.

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



Re: EL issues and 6.0.x release

2010-01-30 Thread Mark Thomas
On 30/01/2010 07:33, Konstantin Kolinko wrote:
> Regarding the implementation, AttributeParser.java class. I think
> that, based on the above, we can fix it to solve bug 48627. Other
> parts of the new implementation will remain unchanged.

I'll take another look at this. I thought that this wouldn't work but
that may because I was doing my testing before I fixed the EL parsing.
If this doesn't work I have an alternative plan.

> 1. In JSP 2.1 spec there is an option to selectively disable '#'
> expressions when '$' ones are still enabled. The name of that option
> is "deferredSyntaxAllowedAsLiteral".
> 
> As of now, AttributeParser takes care of isELIgnored option, but does
> not know about deferredSyntaxAllowedAsLiteral one.

Probably a bug. We should write some test cases for this first though to
check.

> 2. There are several places in AttributeParser#parseLiteral() where
> 
> if (type == 0) {
> type = '$';
> }
> 
> That is where the bug 48627 lies. The above code turns non-dynamic
> attribute in a dynamic one.

Agreed.

> 3. EL spec (ch.1.2.3 of EL 2.1 spec) says that "It is illegal to mix
> ${} and #{} constructs in a composite expression." though followed by
> "This restriction may be lifted in future versions".
> 
> AttributeParser#parseLiteral() has the following clause:
> 
> } else if (ch == type){
> 
> I think it has to process '#' and '$' expressions in the same way, and
> the "mix ${} and #{}" rule should be checked either explicitly here,
> or elsewhere. I have not researched the question where it is actually
> checked.

More tests cases required.

> 4. I have not researched this question, and I *can be wrong* in this
> point, but I think that when EL is evaluated, the engine does not know
> about  isELIgnored and deferredSyntaxAllowedAsLiteral options.

The parser does know. Parsing is done in two phases. The first phase
parses directives, the second phase parses everything else. This ensures
when everything else is parsed, the parser knows the correct way to
handle stuff that might be an expression.

See http://svn.apache.org/viewvc?view=revision&revision=708165

> Lastly,
> when Mark was testing TC7 with JSP 2.2 TCK, he caught several minor EL
> evaluation issues. Those are fixed in TC7, and I think some of them
> have to be backported to TC6.

They all need back-porting. I didn't propose them at the time since the
issues had existing for all of the 6.0.x release and no-one had
complained. I didn't want to hold up the 6.0.24 release.

Thanks for the review.

Mark



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



svn commit: r904834 - /tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 17:57:40 2010
New Revision: 904834

URL: http://svn.apache.org/viewvc?rev=904834&view=rev
Log:
Add a couple of debug messages

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java?rev=904834&r1=904833&r2=904834&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java Sat Jan 30 
17:57:40 2010
@@ -431,6 +431,7 @@
 }
 uc.getInputStream().close();
 } catch (Exception e) {
+log.debug("Problem accessing resource. Treat as outdated.", e);
 return true;
 }
 
@@ -493,6 +494,7 @@
 return true;
 }
 } catch (Exception e) {
+log.debug("Problem accessing resource. Treat as outdated.", e);
 return true;
 }
 }



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



svn commit: r904844 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 18:30:49 2010
New Revision: 904844

URL: http://svn.apache.org/viewvc?rev=904844&view=rev
Log:
Update proposal in response to Konstantin's review

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904844&r1=904843&r2=904844&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 18:30:49 2010
@@ -61,19 +61,13 @@
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47878
   Return 404's rather than a permanent 500 if a JSP is deleted
-  http://svn.apache.org/viewvc?view=rev&revision=439565
+  Make sure first response port deletion is correct
+  Port of r439565, r832102 & r904834
+  http://people.apache.org/~markt/patches/2010-01-30-bug47878-tc5.patch
   +1: markt
   -1:
-   0: kkolinko (
- - In general looks good, but I do not like Compiler.java part of the
- patch. Printing exceptions to stderr aka catalina.out is not good, but
- silently swallowing them is not good either. Though that is to be
- fixed in tc6.0.x first.
- - I would like rev.832102 to be combined with this one.
- - Just a note: This issue won't affect configurations where Jasper
+ kkolinko - Just a note: This issue won't affect configurations where 
Jasper
  runs with development=false.
-  )
-
 
 * Fix CVE-2009-3548 - Windows installer uses insecure default password
   http://svn.apache.org/viewvc?rev=834047&view=rev



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



svn commit: r904847 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 18:54:52 2010
New Revision: 904847

URL: http://svn.apache.org/viewvc?rev=904847&view=rev
Log:
Withdraw my proposal, vote for Konstantin's

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904847&r1=904846&r2=904847&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 18:54:52 2010
@@ -70,19 +70,11 @@
  runs with development=false.
 
 * Fix CVE-2009-3548 - Windows installer uses insecure default password
-  http://svn.apache.org/viewvc?rev=834047&view=rev
-  +1: markt, mturk
-  -1:
-   kkolinko: It cannot be applied cleanly, because manager and
-   host-manager are at different paths in TC5.5.
-
-  Alternative patch:
-  Fix CVE-2009-3548 - Windows installer uses insecure default password
   Also removes some old commented-out code and changes some message strings.
   This patch file is a backport of revs. 834047, 836036, 836045, 836209
   
http://people.apache.org/~kkolinko/patches/2009-11-14_Installer_password_tc55.patch
-  +1: kkolinko
-  -1:
+  +1: kkolinko, markt
+  -1: 
 
 * Single quote should be not be treated as a separator
   http://svn.apache.org/viewvc?rev=830999&view=rev



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



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

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 18:55:11 2010
New Revision: 904848

URL: http://svn.apache.org/viewvc?rev=904848&view=rev
Log:
Proposal

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=904848&r1=904847&r2=904848&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Jan 30 18:55:11 2010
@@ -132,3 +132,7 @@
   -1: fhanik - easier to pass in the root path (lib/bin) to the macro instead 
of hacking around it
if we remove the SCP auto feature, then there should be 
something to replace it with
(http://ant.apache.org/manual/OptionalTasks/scp.html)  
+
+* Add some debug logging where exceptions where previously swallowed
+  http://svn.apache.org/viewvc?rev=904834&view=rev
+  +1: mark



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



svn commit: r904851 - in /tomcat/tc5.5.x/trunk: STATUS.txt connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 19:14:15 2010
New Revision: 904851

URL: http://svn.apache.org/viewvc?rev=904851&view=rev
Log:
Apply the alternative fix for CVE-2009-3555: SSL MITM

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.java

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904851&r1=904850&r2=904851&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 19:14:15 2010
@@ -86,14 +86,6 @@
   +1: markt, kkolinko
   -1: 
 
-* Alternative fix for CVE-2009-3555 SSL MITN
-  The current patch uses an async callback to close the socket. It is
-  technically possible an attack may succeed before the socket is closed
-  The new patch only logs failed server initiated negotiations.
-  http://people.apache.org/~markt/patches/2009-11-20-cve2009-3555-v2.patch
-  +1: markt, rjung, kkolinko
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47609
   Implement fail-safe EOL conversion for source distributions
   Based on a patch provided by sebb

Modified: 
tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=904851&r1=904850&r2=904851&view=diff
==
--- 
tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
 (original)
+++ 
tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
 Sat Jan 30 19:14:15 2010
@@ -29,8 +29,6 @@
 import java.security.KeyStore;
 import java.util.Vector;
 
-import javax.net.ssl.HandshakeCompletedEvent;
-import javax.net.ssl.HandshakeCompletedListener;
 import javax.net.ssl.SSLException;
 import javax.net.ssl.SSLServerSocket;
 import javax.net.ssl.SSLServerSocketFactory;
@@ -118,11 +116,6 @@
 SSLSocket asock = null;
 try {
  asock = (SSLSocket)socket.accept();
- if (!allowUnsafeLegacyRenegotiation) {
- asock.addHandshakeCompletedListener(
- new DisableSslRenegotiation());
- }
-
  configureClientAuth(asock);
 } catch (SSLException e){
   throw new SocketException("SSL handshake error" + e.toString());
@@ -131,27 +124,13 @@
 }
 
 
-private static class DisableSslRenegotiation 
-implements HandshakeCompletedListener {
-private volatile boolean completed = false;
- 
-public void handshakeCompleted(HandshakeCompletedEvent event) {
-if (completed) {
-try {
-log.warn("SSL renegotiation is disabled, closing 
connection");
-event.getSession().invalidate();
-event.getSocket().close();
-} catch (IOException e) {
-// ignore
-}
-}
-completed = true;
-}
-}
-
-
 public void handshake(Socket sock) throws IOException {
 ((SSLSocket)sock).startHandshake();
+
+if (!allowUnsafeLegacyRenegotiation) {
+// Prevent futher handshakes by removing all cipher suites
+((SSLSocket) sock).setEnabledCipherSuites(new String[0]);
+}
 }
 
 /*

Modified: 
tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=904851&r1=904850&r2=904851&view=diff
==
--- 
tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
 (original)
+++ 
tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
 Sat Jan 30 19:14:15 2010
@@ -132,6 +132,16 @@
 
 protected void handShake() throws IOException {
 ssl.setNeedClientAuth(true);
+
+if (ssl.getEnabledCipherSuites().length == 0) {
+// Handshake is never going to be successful.
+// Assume this is because handshakes are disabled
+log.warn("SSL server initiated renegotiation is disabled, closing 
connection");
+ssl.getSession().invalidate();
+ssl.close();
+return;
+}
+
 ssl.startHandshake();
 }
 /**



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

svn commit: r904852 - in /tomcat/site/trunk: docs/security-5.html xdocs/security-5.xml

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 19:16:00 2010
New Revision: 904852

URL: http://svn.apache.org/viewvc?rev=904852&view=rev
Log:
Use Tomcat 5 version info for Tomcat 5

Modified:
tomcat/site/trunk/docs/security-5.html
tomcat/site/trunk/xdocs/security-5.xml

Modified: tomcat/site/trunk/docs/security-5.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security-5.html?rev=904852&r1=904851&r2=904852&view=diff
==
--- tomcat/site/trunk/docs/security-5.html (original)
+++ tomcat/site/trunk/docs/security-5.html Sat Jan 30 19:16:00 2010
@@ -1208,7 +1208,7 @@
attribute allowUnsafeLegacyRenegotiation has been added to
the BIO connector. It should be set to false (the default)
to protect against this vulnerability. The attribute will be available 
in
-   Tomcat 6.0.21 onwards.
+   Tomcat 5.5.29 onwards.

 The NIO connector is not vulnerable as it does not support
renegotiation.

Modified: tomcat/site/trunk/xdocs/security-5.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security-5.xml?rev=904852&r1=904851&r2=904852&view=diff
==
--- tomcat/site/trunk/xdocs/security-5.xml (original)
+++ tomcat/site/trunk/xdocs/security-5.xml Sat Jan 30 19:16:00 2010
@@ -577,7 +577,7 @@
attribute allowUnsafeLegacyRenegotiation has been added to
the BIO connector. It should be set to false (the default)
to protect against this vulnerability. The attribute will be available 
in
-   Tomcat 6.0.21 onwards.
+   Tomcat 5.5.29 onwards.

 The NIO connector is not vulnerable as it does not support
renegotiation.



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



DO NOT REPLY [Bug 48236] another workaround for CVE-2009-3555 for the BIO connector

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48236

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #8 from Mark Thomas  2010-01-30 11:18:54 GMT ---
The new patch has been applied to 5.5.x and will be included in 5.5.29 onwards.

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

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



svn commit: r904854 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 19:24:53 2010
New Revision: 904854

URL: http://svn.apache.org/viewvc?rev=904854&view=rev
Log:
Withdraw my proposal, vote for Konstantin's

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904854&r1=904853&r2=904854&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 19:24:53 2010
@@ -89,21 +89,13 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47609
   Implement fail-safe EOL conversion for source distributions
   Based on a patch provided by sebb
-  http://people.apache.org/~markt/patches/2009-12-31-bug47609.patch
-  +1: markt
-  -1: kkolinko: 1) extra comma in "*.java" pattern, 2) missing
-   extentionless names, 3) native sources are no more included, so *.c etc.
-   patterns are not needed.
-
-  Corrected patch:
-  I should add that this patch is required, because otherwise the *.keystore
+  This patch is required, because otherwise the *.keystore
   files used in storeconfig[-ha] module tests become broken in the -src.tar.gz
   bundle.
   http://people.apache.org/~kkolinko/patches/2010-01-05_tc55_bug47609.patch
-  +1: kkolinko
+  +1: kkolinko, markt
   -1:
 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47997
   Process changes for all naming contexts, not just the global one
   http://svn.apache.org/viewvc?rev=883134&view=rev



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



svn commit: r904855 - in /tomcat/tc5.5.x/trunk: ./ container/modules/ha/src/share/org/apache/catalina/ha/session/ container/webapps/docs/

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 19:30:07 2010
New Revision: 904855

URL: http://svn.apache.org/viewvc?rev=904855&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47554
httpOnly flag not applied to migrated session cookie

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/JvmRouteBinderValve.java

tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/LocalStrings.properties
tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904855&r1=904854&r2=904855&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 19:30:07 2010
@@ -102,12 +102,6 @@
   +1: markt, rjung
   -1: 
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47554
-  httpOnly flag not applied to migrated session cookie
-  http://svn.apache.org/viewvc?rev=891304&view=rev
-  +1: markt, rjung, kkolinko
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48311
   Only the APR lifecycle listener should try and initialise APR
   Patch also syncs all APR lifecycle listener changes from 6.0.x to 5.5.x

Modified: 
tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/JvmRouteBinderValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/JvmRouteBinderValve.java?rev=904855&r1=904854&r2=904855&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/JvmRouteBinderValve.java
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/JvmRouteBinderValve.java
 Sat Jan 30 19:30:07 2010
@@ -433,12 +433,14 @@
 newCookie.setSecure(true);
 }
 if (log.isDebugEnabled()) {
-log.debug(sm.getString("jvmRoute.newSessionCookie",
-sessionId, Globals.SESSION_COOKIE_NAME, newCookie
-.getPath(), new Boolean(newCookie
-.getSecure(;
+Object[] args = new Object[] {sessionId,
+Globals.SESSION_COOKIE_NAME,
+newCookie.getPath(),
+new Boolean(newCookie.getSecure()),
+new Boolean(context.getUseHttpOnly())};
+log.debug(sm.getString("jvmRoute.newSessionCookie", args));
 }
-response.addCookie(newCookie);
+response.addCookieInternal(newCookie, 
context.getUseHttpOnly());
 }
 }
 }

Modified: 
tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/LocalStrings.properties?rev=904855&r1=904854&r2=904855&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/LocalStrings.properties
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/modules/ha/src/share/org/apache/catalina/ha/session/LocalStrings.properties
 Sat Jan 30 19:30:07 2010
@@ -78,7 +78,7 @@
 jvmRoute.listener.stopped=SessionID Binder Listener stopped
 jvmRoute.lostSession=Lost Session [{0}] at path [{1}]
 jvmRoute.missingJvmRouteAttribute=No engine jvmRoute attribute configured!
-jvmRoute.newSessionCookie=Setting cookie with session id [{0}] name: [{1}] 
path: [{2}] secure: [{3}]
+jvmRoute.newSessionCookie=Setting cookie with session id [{0}] name: [{1}] 
path: [{2}] secure: [{3}] httpOnly: [{4}]
 jvmRoute.noCluster=The JvmRouterBinderValve is configured, but clustering is 
not being used. Fail over will still work, providing a PersistentManager is 
used.
 jvmRoute.notFoundManager=Not found Cluster DeltaManager {0} at {1}
 jvmRoute.receiveMessage.sessionIDChanged=Cluster 
JvmRouteSessionIDBinderListener received orginal session ID [{0}] set to new id 
[{1}] for context path [{2}]

Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=904855&r1=904854&r2=904855&view=diff
==
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Sat Jan 30 
19:30:07 2010
@@ -201,6 +201,10 @@
 46384: Correct synchronisation issue that could lead to

DO NOT REPLY [Bug 47554] o.a.c.h.s.JvmRouteBinderValve doesn't set HttpOnly flag to session Cookie.

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47554

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #7 from Mark Thomas  2010-01-30 11:30:27 GMT ---
This has been fixed for 5.5.x and will be included in 5.5.29 onwards.

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

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



svn commit: r904859 - in /tomcat/tc5.5.x/trunk: ./ container/catalina/src/share/org/apache/catalina/connector/ container/catalina/src/share/org/apache/catalina/core/ container/webapps/docs/

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 19:46:02 2010
New Revision: 904859

URL: http://svn.apache.org/viewvc?rev=904859&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48311
Only the APR lifecycle listener should try and initialise APR
Patch also syncs all APR lifecycle listener changes from 6.0.x to 5.5.x
  

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/connector/Connector.java

tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
tomcat/tc5.5.x/trunk/container/webapps/docs/ssl-howto.xml

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904859&r1=904858&r2=904859&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 19:46:02 2010
@@ -102,16 +102,6 @@
   +1: markt, rjung
   -1: 
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48311
-  Only the APR lifecycle listener should try and initialise APR
-  Patch also syncs all APR lifecycle listener changes from 6.0.x to 5.5.x
-  http://people.apache.org/~markt/patches/2009-11-27-bug48300-tc5.patch
-  +1: markt, rjung, kkolinko
-  -1: 
-kkolinko: 1. It introduces SSLEngine property in AprLifecycleListener,
- it could be described in ssl-howto.html, see 6.0.  2. BZ 48613 is
- an issue that existed before this patch, but it makes it noticeable.
-
 * Address https://issues.apache.org/bugzilla/show_bug.cgi?id=45255
   Prevent session fixation by changing session ID on authentication by default
   If you don't like the session ID changing by default, feel free to caveat 
your

Modified: 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/connector/Connector.java?rev=904859&r1=904858&r2=904859&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/connector/Connector.java
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/connector/Connector.java
 Sat Jan 30 19:46:02 2010
@@ -32,6 +32,7 @@
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Service;
+import org.apache.catalina.core.AprLifecycleListener;
 import org.apache.catalina.core.StandardEngine;
 import org.apache.catalina.util.LifecycleSupport;
 import org.apache.catalina.util.StringManager;
@@ -607,23 +608,7 @@
  */
 public void setProtocol(String protocol) {
 
-// Test APR support
-boolean apr = false;
-try {
-String methodName = "initialize";
-Class paramTypes[] = new Class[1];
-paramTypes[0] = String.class;
-Object paramValues[] = new Object[1];
-paramValues[0] = null;
-Method method = Class.forName("org.apache.tomcat.jni.Library")
-.getMethod(methodName, paramTypes);
-method.invoke(null, paramValues);
-apr = true;
-} catch (Throwable t) {
-// Ignore
-}
-
-if (apr) {
+if (AprLifecycleListener.isAprAvailable()) {
 if ("HTTP/1.1".equals(protocol)) {
 setProtocolHandlerClassName
 ("org.apache.coyote.http11.Http11AprProtocol");

Modified: 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java?rev=904859&r1=904858&r2=904859&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
 Sat Jan 30 19:46:02 2010
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,20 +18,25 @@
 package org.apache.catalina.core;
 
 
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+
 import org.apache.catalin

DO NOT REPLY [Bug 48311] AprLifecycleListener: Bogus behaviour with Http11AprProtocol and java.library.path

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48311

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #9 from Mark Thomas  2010-01-30 11:46:05 GMT ---
This has been fixed in 5.5.x and will be included in 5.5.29 onwards.

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

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



svn commit: r904865 - /tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 20:13:56 2010
New Revision: 904865

URL: http://svn.apache.org/viewvc?rev=904865&view=rev
Log:
Fix Java 1.4/1.5 issues (5.5.x must compile with 1.4)

Modified:

tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java

Modified: 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java?rev=904865&r1=904864&r2=904865&view=diff
==
--- 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
 (original)
+++ 
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
 Sat Jan 30 20:13:56 2010
@@ -197,9 +197,11 @@
  + minor + "." + patch));
 }
 // Log APR flags
-log.info(sm.getString("aprListener.flags", Library.APR_HAVE_IPV6,
-Library.APR_HAS_SENDFILE, Library.APR_HAS_SO_ACCEPTFILTER,
-Library.APR_HAS_RANDOM));
+log.info(sm.getString("aprListener.flags",
+Boolean.valueOf(Library.APR_HAVE_IPV6),
+Boolean.valueOf(Library.APR_HAS_SENDFILE),
+Boolean.valueOf(Library.APR_HAS_SO_ACCEPTFILTER),
+Boolean.valueOf(Library.APR_HAS_RANDOM)));
 aprAvailable = true;
 }
 



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



svn commit: r904878 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 20:40:41 2010
New Revision: 904878

URL: http://svn.apache.org/viewvc?rev=904878&view=rev
Log:
Base proposal on 6.0.x version of patch

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904878&r1=904877&r2=904878&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 20:40:41 2010
@@ -124,11 +124,8 @@
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47963
   Prevent use of non-RFC2616 compliant custom status messages
-  http://svn.apache.org/viewvc?rev=892612&view=rev
-  +1: markt
-  +1: kkolinko:  +1 to use r892777 instead of proposed r892612
- - TC 6.0 version of the patch is more applicable here, than the one of
- trunk.
+  http://svn.apache.org/viewvc?view=revision&revision=892777
+  +1: markt, kkolinko
   -1: 
 
 * Remove unneeded line from the method that normalizes decodedURI.



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



svn commit: r904879 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 20:42:16 2010
New Revision: 904879

URL: http://svn.apache.org/viewvc?rev=904879&view=rev
Log:
Vote

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904879&r1=904878&r2=904879&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 20:42:16 2010
@@ -143,7 +143,7 @@
   http://svn.apache.org/viewvc?rev=895703&view=rev
   We should not vote before 1.1.19 is officially released.
   Patch by rjung
-  +1: kkolinko
+  +1: kkolinko, markt
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48004



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



svn commit: r904880 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 20:43:39 2010
New Revision: 904880

URL: http://svn.apache.org/viewvc?rev=904880&view=rev
Log:
Votes

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904880&r1=904879&r2=904880&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 20:43:39 2010
@@ -130,12 +130,12 @@
 
 * Remove unneeded line from the method that normalizes decodedURI.
   http://svn.apache.org/viewvc?rev=892812&view=rev
-  +1: kkolinko
+  +1: kkolinko, markt
   -1:
 
 * Update Tomcat-Native included in TC distributives to 1.1.19
   http://people.apache.org/~kkolinko/patches/2010-01-27_tc55_native-x19.patch
-  +1: kkolinko
+  +1: kkolinko, markt
   -1:
 
 * Update recommended tcnative version to the forthcoming 1.1.19.



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



AprLifecycleListener reflective access to o.a.t.jni.Library (was Re: svn commit: r904865)

2010-01-30 Thread Konstantin Kolinko
2010/1/30  :
> Author: markt
> Date: Sat Jan 30 20:13:56 2010
> New Revision: 904865
>
> URL: http://svn.apache.org/viewvc?rev=904865&view=rev
> Log:
> Fix Java 1.4/1.5 issues (5.5.x must compile with 1.4)
>
> Modified:
>    
> tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
>

>         // Log APR flags
> -        log.info(sm.getString("aprListener.flags", Library.APR_HAVE_IPV6,
> -                Library.APR_HAS_SENDFILE, Library.APR_HAS_SO_ACCEPTFILTER,
> -                Library.APR_HAS_RANDOM));
> +        log.info(sm.getString("aprListener.flags",
> +                Boolean.valueOf(Library.APR_HAVE_IPV6),
> +                Boolean.valueOf(Library.APR_HAS_SENDFILE),
> +                Boolean.valueOf(Library.APR_HAS_SO_ACCEPTFILTER),
> +                Boolean.valueOf(Library.APR_HAS_RANDOM)));
>         aprAvailable = true;
>     }
>

By the way:
It is odd, that AprLifecycleListener class uses reflection to call the
methods of o.a.t.jni.Library, but later accesses its fields directly.

Is there any meaning behind that?

I do not mind, as far as it works. I am just curious.

I thought that was to be able to separate o.a.t.jni.* into separate
jar, and to be able to run AprLifecycleListener even if that jar is
not available.



Best regards,
Konstantin Kolinko

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



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

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 21:40:37 2010
New Revision: 904897

URL: http://svn.apache.org/viewvc?rev=904897&view=rev
Log:
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=904897&r1=904896&r2=904897&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Jan 30 21:40:37 2010
@@ -82,7 +82,7 @@
   
http://people.apache.org/~kkolinko/patches/2010-01-03_bug48464-c4_ampersand_tc6.patch
   (a backport of revs. 895191, 895392)
   Tested on Windows XP.
-  +1: kkolinko, rjung
+  +1: kkolinko, rjung, markt
   -1:
   rjung: I would slightly prefer to apply after we finally managed to produce 
a working
  release for 6.0.x, since changes in the Windows bat files are hard to 
test
@@ -98,18 +98,18 @@
 * Remove @Deprecated annotations from javax.servlet.jsp.JspContext
   Part of http://svn.apache.org/viewvc?rev=899635&view=rev
   
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/JspContext.java?view=diff&r1=899634&r2=899635&pathrev=899635
-  +1: kkolinko
+  +1: kkolinko, markt
   -1:
 
 * Use CRLF line ends in conf/* files installed by the Windows exe installer
   
http://people.apache.org/~kkolinko/patches/2010-01-18_tc6_installer-crlf.patch
-  +1: kkolinko, jfclere
+  +1: kkolinko, jfclere, markt
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48614
   Stream encoder uses an internal buffer and the wrong default was being used 
in the code
   http://svn.apache.org/viewvc?rev=903916&view=rev
-  +1: fhanik
+  +1: fhanik, markt
   +1: kkolinko: only if documentation on bufferSize property in logging.xml
 is updated as well
 ( Re documentation: maybe it would be easier to make a table of
@@ -122,7 +122,7 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48613
   Only attempt APR initialization if the  has been specified
   http://svn.apache.org/viewvc?rev=904224&view=rev
-  +1: fhanik
+  +1: fhanik, markt
   -1: 
 
 * Fix the maven stuff for the maven repo.



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



svn commit: r904898 - /tomcat/trunk/dist.xml

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 21:43:41 2010
New Revision: 904898

URL: http://svn.apache.org/viewvc?rev=904898&view=rev
Log:
Changing line endings isn't limited to source files.

Modified:
tomcat/trunk/dist.xml

Modified: tomcat/trunk/dist.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/dist.xml?rev=904898&r1=904897&r2=904898&view=diff
==
--- tomcat/trunk/dist.xml (original)
+++ tomcat/trunk/dist.xml Sat Jan 30 21:43:41 2010
@@ -78,8 +78,8 @@
 
   
 
-  
-  
+  
+  
 
 
 
@@ -646,7 +646,7 @@
   
 
-  
+  
 
 
   
@@ -661,7 +661,7 @@
   
 
-  
+  
 
 



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



svn commit: r904902 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 22:15:58 2010
New Revision: 904902

URL: http://svn.apache.org/viewvc?rev=904902&view=rev
Log:
Proposal

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904902&r1=904901&r2=904902&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 22:15:58 2010
@@ -158,3 +158,10 @@
   http://svn.apache.org/viewvc?rev=898558&view=rev
   +1: markt, kkolinko
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47987
+  http://svn.apache.org/viewvc?rev=832200&view=rev
+  Limit size of not found resources cache
+  +1: markt
+  -1: 
+ 
\ No newline at end of file



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



DO NOT REPLY [Bug 47987] Out of memory being caused by notFoundResources in org.apache.catalina.loader.WebappClassLoader

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47987

--- Comment #4 from Mark Thomas  2010-01-30 14:16:37 GMT ---
I have proposed porting the fix from 6.0.x to 5.5.x

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

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



svn commit: r904904 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 22:21:19 2010
New Revision: 904904

URL: http://svn.apache.org/viewvc?rev=904904&view=rev
Log:
Add bug reference

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904904&r1=904903&r2=904904&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 22:21:19 2010
@@ -76,7 +76,8 @@
   +1: kkolinko, markt
   -1: 
 
-* Single quote should be not be treated as a separator
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48322
+  Single quote should be not be treated as a separator
   http://svn.apache.org/viewvc?rev=830999&view=rev
   +1: markt, kkolinko
   -1: 



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



svn commit: r904913 - /tomcat/tc5.5.x/trunk/STATUS.txt

2010-01-30 Thread kkolinko
Author: kkolinko
Date: Sat Jan 30 23:03:06 2010
New Revision: 904913

URL: http://svn.apache.org/viewvc?rev=904913&view=rev
Log:
vote

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=904913&r1=904912&r2=904913&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Jan 30 23:03:06 2010
@@ -164,5 +164,9 @@
   http://svn.apache.org/viewvc?rev=832200&view=rev
   Limit size of not found resources cache
   +1: markt
+  +1: kkolinko (minus generics)
   -1: 
+   kkolinko: LinkedHashMap is present in JDK 1.4 (At first I thought it was
+   added in 1.5 only, but I was wrong).
+
  
\ No newline at end of file



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



svn commit: r904914 - /tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 23:08:46 2010
New Revision: 904914

URL: http://svn.apache.org/viewvc?rev=904914&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48629
Get nested role search working when {1} is used in roleSearch
Patch provided by Gabriel

Modified:
tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=904914&r1=904913&r2=904914&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java Sat Jan 30 
23:08:46 2010
@@ -1686,7 +1686,7 @@
 Set newThisRound = new HashSet(); // Stores 
the groups we find in this iteration
 
 for (String groupDN : newGroupDNs) {
-filter = roleFormat.format(new String[] { groupDN });
+filter = roleFormat.format(new String[] { groupDN, groupDN 
});
 
 if (containerLog.isTraceEnabled()) {
 containerLog.trace("Perform a nested group search with 
base "+ roleBase + " and filter " + filter);



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



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

2010-01-30 Thread markt
Author: markt
Date: Sat Jan 30 23:10:21 2010
New Revision: 904915

URL: http://svn.apache.org/viewvc?rev=904915&view=rev
Log:
Proposal

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=904915&r1=904914&r2=904915&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Jan 30 23:10:21 2010
@@ -136,3 +136,10 @@
 * Add some debug logging where exceptions where previously swallowed
   http://svn.apache.org/viewvc?rev=904834&view=rev
   +1: mark
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48629
+  Get nested role search working when {1} is used in roleSearch
+  Patch provided by Gabriel
+  http://svn.apache.org/viewvc?rev=904914&view=rev
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 48629] JNDIRealm and roleNested doesn't work with roleSearch="(member={1})"

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48629

--- Comment #1 from Mark Thomas  2010-01-30 15:10:38 GMT ---
This has been fixed in trunk and proposed for 6.0.x.

Many thanks for the patch.

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

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



DO NOT REPLY [Bug 48629] JNDIRealm and roleNested doesn't work with roleSearch="(member={1})"

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48629

--- Comment #2 from Konstantin Kolinko  2010-01-30 
15:58:10 UTC ---
I do not think that this patch is good.

See, groupDN is a full distinguished name of a role, while in your case {1} was
just a name. Does it work for your configuration?

http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm

For reference, previous discussion:
http://markmail.org/message/cv3i6set7yte57yr


In any case,
1) If your configuration works when you do
roleSearch="(member={1})" when {1} is a DN of a group,
 then I think we would better provide a separate attribute to specify search
filter for the nested roles.


E.g.,
roleSearch="(member={1})" roleNestedSearch="(member={0})"
where {0} in the second case is a group DN, as it is now.


We can default roleNestedSearch to be the same as roleSearch when
roleNested="true",  and to default roleNested="true" when roleNestedSearch is
explicitly specified.


2) If you need unqualified rolename,
it can be obtained, but the patch will be more complicated.

In the code we have
  Set newGroupDNs = new HashSet(groupMap.keySet());
  ..
  for (String groupDN : newGroupDNs) {
  ..
  groupMap.put(dname, name);

We should replace Set newGroupDNs  with
  Map newGroups = new HashMap(groupMap);

Perform iteration over entrySet of the map:
  for (Map.Entry newGroup : newGroups.entrySet()) {

Then, newGroup.getKey() will give us the groupDN and newGroup.getValue() will
give us the group name.



3) It would be nice to update realm-howto.html with documentation on using the
roleNested="true". It is not documented yet.  Can you propose a patch for
/webapps/docs/realm-howto.xml,  or at least describe your configuration so that
it can be provided as an example there?

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

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



svn commit: r904935 - in /tomcat/trunk/test: org/apache/el/TestELInJsp.java webapp/WEB-INF/tags/echo-deferred.tag webapp/WEB-INF/tags/implicit.tld webapp/bug45451.jspf webapp/bug45451c.jsp webapp/bug4

2010-01-30 Thread markt
Author: markt
Date: Sun Jan 31 00:34:37 2010
New Revision: 904935

URL: http://svn.apache.org/viewvc?rev=904935&view=rev
Log:
Add tests for AttributeParser and deferredSyntaxAllowedAsLiteral

Added:
tomcat/trunk/test/webapp/WEB-INF/tags/echo-deferred.tag   (with props)
tomcat/trunk/test/webapp/WEB-INF/tags/implicit.tld   (with props)
tomcat/trunk/test/webapp/bug45451e.jsp   (with props)
Modified:
tomcat/trunk/test/org/apache/el/TestELInJsp.java
tomcat/trunk/test/webapp/bug45451.jspf
tomcat/trunk/test/webapp/bug45451c.jsp
tomcat/trunk/test/webapp/bug45451d.jspx

Modified: tomcat/trunk/test/org/apache/el/TestELInJsp.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestELInJsp.java?rev=904935&r1=904934&r2=904935&view=diff
==
--- tomcat/trunk/test/org/apache/el/TestELInJsp.java (original)
+++ tomcat/trunk/test/org/apache/el/TestELInJsp.java Sun Jan 31 00:34:37 2010
@@ -165,6 +165,11 @@
 assertTrue(result.indexOf("06-\\2") > 0);  
 assertTrue(result.indexOf("07-\\${1+1}") > 0);
 assertTrue(result.indexOf("08-2") > 0); 
+assertTrue(result.indexOf("09-2") > 0);
+assertTrue(result.indexOf("10-#{1+1}") > 0);
+assertTrue(result.indexOf("11-\\2") > 0);  
+assertTrue(result.indexOf("12-\\#{1+1}") > 0);
+assertTrue(result.indexOf("13-2") > 0); 
 
 res = getUrl("http://localhost:"; + getPort() + "/test/bug45451c.jsp");
 result = res.toString();
@@ -180,6 +185,11 @@
 assertTrue(result.indexOf("06-\\${1+1}") > 0);
 assertTrue(result.indexOf("07-${1+1}") > 0);
 assertTrue(result.indexOf("08-${1+1}") > 0);
+assertTrue(result.indexOf("09-#{1+1}") > 0);
+assertTrue(result.indexOf("10-\\#{1+1}") > 0);
+assertTrue(result.indexOf("11-\\#{1+1}") > 0);
+assertTrue(result.indexOf("12-#{1+1}") > 0);
+assertTrue(result.indexOf("13-#{1+1}") > 0);
 
 res = getUrl("http://localhost:"; + getPort() + "/test/bug45451d.jspx");
 result = res.toString();
@@ -194,6 +204,32 @@
 assertTrue(result.indexOf("06-\\${1+1}") > 0);
 assertTrue(result.indexOf("07-${1+1}") > 0);
 assertTrue(result.indexOf("08-\\${1+1}") > 0);
+assertTrue(result.indexOf("09-2") > 0);
+assertTrue(result.indexOf("10-#{1+1}") > 0);
+assertTrue(result.indexOf("11-\\#{1+1}") > 0);
+assertTrue(result.indexOf("12-#{1+1}") > 0);
+assertTrue(result.indexOf("13-\\#{1+1}") > 0);
+
+res = getUrl("http://localhost:"; + getPort() + "/test/bug45451e.jsp");
+result = res.toString();
+System.out.println(result);
+// Warning: JSP attribute escaping != Java String escaping
+// Warning: Attributes are always unescaped before passing to the EL
+//  processor
+assertTrue(result.indexOf("00-2") > 0);
+assertTrue(result.indexOf("01-${1+1}") > 0);
+assertTrue(result.indexOf("02-\\${1+1}") > 0);
+assertTrue(result.indexOf("03-${1+1}") > 0);
+assertTrue(result.indexOf("04-2") > 0);
+assertTrue(result.indexOf("05-${1+1}") > 0);
+assertTrue(result.indexOf("06-\\2") > 0);  
+assertTrue(result.indexOf("07-\\${1+1}") > 0);
+assertTrue(result.indexOf("08-2") > 0); 
+assertTrue(result.indexOf("09-#{1+1}") > 0);
+assertTrue(result.indexOf("10-\\#{1+1}") > 0);
+assertTrue(result.indexOf("11-\\#{1+1}") > 0);
+assertTrue(result.indexOf("12-#{1+1}") > 0);
+assertTrue(result.indexOf("13-#{1+1}") > 0);
 }
 
 public void testBug45511() throws Exception {

Added: tomcat/trunk/test/webapp/WEB-INF/tags/echo-deferred.tag
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/WEB-INF/tags/echo-deferred.tag?rev=904935&view=auto
==
--- tomcat/trunk/test/webapp/WEB-INF/tags/echo-deferred.tag (added)
+++ tomcat/trunk/test/webapp/WEB-INF/tags/echo-deferred.tag Sun Jan 31 00:34:37 
2010
@@ -0,0 +1,17 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissi

DO NOT REPLY [Bug 48643] New: catalina.session.FileStore.save() and load() - close() bugs

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48643

   Summary: catalina.session.FileStore.save() and load() - close()
bugs
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: s...@apache.org


The code for the save() method reads:

try {
fos = new FileOutputStream(file.getAbsolutePath());
oos = new ObjectOutputStream(new BufferedOutputStream(fos));
} catch (IOException e) {
if (oos != null) { <== oos can only be null here
try {
oos.close();
} catch (IOException f) {
// Ignore
}
}
throw e;
}

Presumably the catch statement should try to close fos instead?

Similarly for the load() method; at line 280/281 there is the code:

} catch (IOException e) {
if (ois != null) {

However, ois is the last object created by the try clause, so must be null.
Probably the code should check and close bis and/or fis.

At the end of the load() method, the code says:

// Close the input stream
if (ois != null) {

However, ois cannot be null at that point.

Note: these bugs were detected by the Eclipse compiler.

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

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



svn commit: r904943 - /tomcat/trunk/test/org/apache/el/TestELEvaluation.java

2010-01-30 Thread markt
Author: markt
Date: Sun Jan 31 00:56:47 2010
New Revision: 904943

URL: http://svn.apache.org/viewvc?rev=904943&view=rev
Log:
Test mixing ${...} and #{...} in the same expression

Modified:
tomcat/trunk/test/org/apache/el/TestELEvaluation.java

Modified: tomcat/trunk/test/org/apache/el/TestELEvaluation.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestELEvaluation.java?rev=904943&r1=904942&r2=904943&view=diff
==
--- tomcat/trunk/test/org/apache/el/TestELEvaluation.java (original)
+++ tomcat/trunk/test/org/apache/el/TestELEvaluation.java Sun Jan 31 00:56:47 
2010
@@ -171,6 +171,22 @@
 assertTrue(null == null);
 }
 
+/**
+ * Test mixing ${...} and #{...} in the same expression.
+ */
+public void testMixedTypes() {
+// Mixing types should throw an error
+Exception e = null;
+try {
+evaluateExpression("${1+1}#{1+1}");
+} catch (ELException el) {
+e = el;
+}
+assertNotNull(e);
+}
+
+
+
 // 
 
 private String evaluateExpression(String expression) {



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



DO NOT REPLY [Bug 48643] catalina.session.FileStore.save() and load() - close() bugs

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48643

--- Comment #1 from Sebb  2010-01-30 17:10:36 UTC ---
There are similar problems in session.StandardManager.doUnload():

line 502, 530, and at line 542 there's a block of code:

// Flush and close the output stream
try {
oos.flush();
oos.close();
oos = null;
} catch (IOException e) {
if (oos != null) {
try {
oos.close();
} catch (IOException f) {
// Ignore
}
oos = null;
}
throw e;
}

This code looks as though it is trying to close() oos if the flush() fails, but
it will also try to close() oos if the close() fails.

Probably the first oos.close() should be removed. 
AFAICT, there is also no need to set the oos field to null.

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

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



DO NOT REPLY [Bug 48644] New: Code should never ignore throwable

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48644

   Summary: Code should never ignore throwable
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: s...@apache.org


There seem to be quite a few places where code catches Throwable and ignores
it.

For example:

ant.jmx.JMXAccessorQueryTask.bindAttributes
ant.jmx.JMXAccessorTask.execute
core.StandardContext - lots of methods

In most cases, catching Exception would be enough.

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

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



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

2010-01-30 Thread markt
Author: markt
Date: Sun Jan 31 01:25:30 2010
New Revision: 904948

URL: http://svn.apache.org/viewvc?rev=904948&view=rev
Log:
Propose fixes for EL TCK failures

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=904948&r1=904947&r2=904948&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Jan 31 01:25:30 2010
@@ -143,3 +143,18 @@
   http://svn.apache.org/viewvc?rev=904914&view=rev
   +1: markt
   -1: 
+
+* Fix various EL TCK failures
+  http://svn.apache.org/viewvc?view=rev&rev=899653 (signatures)
+  http://svn.apache.org/viewvc?view=rev&rev=899769 (CCE expected)
+  http://svn.apache.org/viewvc?view=rev&rev=899770 (CCE expected)
+  http://svn.apache.org/viewvc?view=rev&rev=899783 (ELException expected)
+  http://svn.apache.org/viewvc?view=rev&rev=899788 (PNFE expected)
+  http://svn.apache.org/viewvc?view=rev&rev=899792 (ELException rather than 
IAE)
+  http://svn.apache.org/viewvc?view=rev&rev=899916 (ELException rather than 
IAE)
+  http://svn.apache.org/viewvc?view=rev&rev=899918 (Enum coercion test cases)
+  http://svn.apache.org/viewvc?view=rev&rev=899919 (Enum coercion bug) 
+  http://svn.apache.org/viewvc?view=rev&rev=899935 (ELException expected)
+  http://svn.apache.org/viewvc?view=rev&rev=899949 (ignore whitespace on comp)
+  +1: markt
+  -1: 



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



Re: EL issues and 6.0.x release

2010-01-30 Thread Mark Thomas
On 30/01/2010 17:41, Mark Thomas wrote:
> On 30/01/2010 07:33, Konstantin Kolinko wrote:
>> Regarding the implementation, AttributeParser.java class. I think
>> that, based on the above, we can fix it to solve bug 48627. Other
>> parts of the new implementation will remain unchanged.
> 
> I'll take another look at this. I thought that this wouldn't work but
> that may because I was doing my testing before I fixed the EL parsing.
> If this doesn't work I have an alternative plan.

Looks like it will work. Just running the TCK to be sure.

>> 1. In JSP 2.1 spec there is an option to selectively disable '#'
>> expressions when '$' ones are still enabled. The name of that option
>> is "deferredSyntaxAllowedAsLiteral".
>>
>> As of now, AttributeParser takes care of isELIgnored option, but does
>> not know about deferredSyntaxAllowedAsLiteral one.
> 
> Probably a bug. We should write some test cases for this first though to
> check.

Yep bug. Test cases written. Fixed. Just running the TCK to be sure.

>> 3. EL spec (ch.1.2.3 of EL 2.1 spec) says that "It is illegal to mix
>> ${} and #{} constructs in a composite expression." though followed by
>> "This restriction may be lifted in future versions".
>>
>> AttributeParser#parseLiteral() has the following clause:
>>
>> } else if (ch == type){
>>
>> I think it has to process '#' and '$' expressions in the same way, and
>> the "mix ${} and #{}" rule should be checked either explicitly here,
>> or elsewhere. I have not researched the question where it is actually
>> checked.
> 
> More tests cases required.

Test case added. This is already handled by the EL impl.

>> Lastly,
>> when Mark was testing TC7 with JSP 2.2 TCK, he caught several minor EL
>> evaluation issues. Those are fixed in TC7, and I think some of them
>> have to be backported to TC6.
> 
> They all need back-porting. I didn't propose them at the time since the
> issues had existing for all of the 6.0.x release and no-one had
> complained. I didn't want to hold up the 6.0.24 release.

Proposed.

Assuming the TCK passes I'll have a fix for 46827 and
deferredSyntaxAllowedAsLiteral shortly.

Mark



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



svn commit: r904949 - in /tomcat/trunk: java/org/apache/jasper/compiler/AttributeParser.java java/org/apache/jasper/compiler/Parser.java test/org/apache/jasper/compiler/TestAttributeParser.java

2010-01-30 Thread markt
Author: markt
Date: Sun Jan 31 01:40:39 2010
New Revision: 904949

URL: http://svn.apache.org/viewvc?rev=904949&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48627
Don't convert literal attribute values to EL since attributes may not accept EL

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java
tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
tomcat/trunk/test/org/apache/jasper/compiler/TestAttributeParser.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java?rev=904949&r1=904948&r2=904949&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java Sun Jan 
31 01:40:39 2010
@@ -43,13 +43,16 @@
  *  scripting expressions.
  * @param isELIgnored   Is expression language being ignored on the page
  *  where the JSP attribute is defined.
+ * @param isDeferredSyntaxAllowedAsLiteral
+ *  Are deferred expressions treated as literals?
  * @return  An unquoted JSP attribute that, if it contains
  *  expression language can be safely passed to the EL
  *  processor without fear of ambiguity.
  */
 public static String getUnquoted(String input, char quote,
-boolean isELIgnored) {
+boolean isELIgnored, boolean isDeferredSyntaxAllowedAsLiteral) {
 return (new AttributeParser(input, quote, isELIgnored,
+isDeferredSyntaxAllowedAsLiteral,
 STRICT_QUOTE_ESCAPING)).getUnquoted();
 }
 
@@ -62,15 +65,18 @@
  *  scripting expressions.
  * @param isELIgnored   Is expression language being ignored on the page
  *  where the JSP attribute is defined.
+ * @param isDeferredSyntaxAllowedAsLiteral
+ *  Are deferred expressions treated as literals?
  * @param strictThe value to use for STRICT_QUOTE_ESCAPING.
  * @return  An unquoted JSP attribute that, if it contains
  *  expression language can be safely passed to the EL
  *  processor without fear of ambiguity.
  */
 protected static String getUnquoted(String input, char quote,
-boolean isELIgnored, boolean strict) {
+boolean isELIgnored, boolean isDeferredSyntaxAllowedAsLiteral,
+boolean strict) {
 return (new AttributeParser(input, quote, isELIgnored,
-strict)).getUnquoted();
+isDeferredSyntaxAllowedAsLiteral, strict)).getUnquoted();
 }
 
 /* The quoted input string. */
@@ -83,6 +89,9 @@
  * treated as literals rather than quoted values. */
 private final boolean isELIgnored;
 
+/* Are deferred expression treated as literals */
+private final boolean isDeferredSyntaxAllowedAsLiteral;
+
 /* Overrides the STRICT_QUOTE_ESCAPING. Used for Unit tests only. */
 private final boolean strict;
 
@@ -109,12 +118,15 @@
  * @param strict
  */
 private AttributeParser(String input, char quote,
-boolean isELIgnored, boolean strict) {
+boolean isELIgnored, boolean isDeferredSyntaxAllowedAsLiteral,
+boolean strict) {
 this.input = input;
 this.quote = quote;
 // If quote is null this is a scriptign expressions and any EL syntax
 // should be ignored
 this.isELIgnored = isELIgnored || (quote == 0);
+this.isDeferredSyntaxAllowedAsLiteral =
+isDeferredSyntaxAllowedAsLiteral;
 this.strict = strict;
 this.type = getType(input);
 this.size = input.length();
@@ -151,22 +163,27 @@
 char ch = nextChar();
 if (!isELIgnored && ch == '\\') {
 if (type == 0) {
-type = '$';
+result.append("\\");
+} else {
+result.append(type);
+result.append("{''}");
 }
-result.append(type);
-result.append("{''}");
 } else if (!isELIgnored && ch == '$' && lastChEscaped){
 if (type == 0) {
-type = '$';
+result.append("\\$");
+} else {
+result.append(type);
+result.append("{'$'}");
 }
-result.append(type);
-result.append("{'$'}");
 } else if (!isELIgnored && ch == '#' && lastChEscaped){
+// Note if isDeferredSyntaxAllowedAsLiteral==true, \# will
+

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

2010-01-30 Thread markt
Author: markt
Date: Sun Jan 31 01:43:55 2010
New Revision: 904950

URL: http://svn.apache.org/viewvc?rev=904950&view=rev
Log:
Proposal

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=904950&r1=904949&r2=904950&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Jan 31 01:43:55 2010
@@ -158,3 +158,12 @@
   http://svn.apache.org/viewvc?view=rev&rev=899949 (ignore whitespace on comp)
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48627
+  Regression in re-working of EL parsing
+  Keep literals as literals
+  Also handle deferredSyntaxAllowedAsLiteral
+  JUnit test cases and TCK passes with this patch
+  http://svn.apache.org/viewvc?rev=904949&view=rev
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 48643] catalina.session.FileStore.save() and load() - close() bugs

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48643

Konstantin Kolinko  changed:

   What|Removed |Added

   Severity|normal  |minor

--- Comment #2 from Konstantin Kolinko  2010-01-30 
17:49:39 UTC ---
(In reply to comment #0)
> Note: these bugs were detected by the Eclipse compiler.

I think it is pointless to try to please Eclipse IDE here. That "possible null
access check" is an optional feature (off by default), depends on the version
of IDE that you are using, and also buggy at times, as I experiences just
recently (it gave me contradictory tips regarding "unnecessary null check" for
one line, and then "possible null pointer access" for the same variable few
lines later). Then some other tool will start complaining that we have not
closed a stream there...


Back to the code: I'll agree that you are right that first oos.close(); is
actually never called,  but I do not think we need to close fos here.

I do not see what can fail in the "new ObjectOutputStream(new
BufferedOutputStream(fos))" line, besides maybe an OutOfMemoryError.

As of now, the code is easier to read, even if it is redundant.

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

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



DO NOT REPLY [Bug 48627] JasperException with JSF tags and value expressions

2010-01-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48627

--- Comment #5 from Mark Thomas  2010-01-30 17:56:27 GMT ---
Created an attachment (id=24910)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24910)
Binary patch for testing purposes only

This has been fixed in trunk and proposed for 6.0.x.

To test if you are happy build from source, checkout tc6.0.x/trunk and apply
this patch before building:
http://svn.apache.org/viewvc?view=revision&revision=904949

To test with the binary patch, make the following changes to a 6.0.24
installation:

1. Create the following directory structure in $CATALINA_HOME/lib
org/apache/jasper/compiler

2. Download the binary patch attachment and extract the 2 class files to the
directory you created in step 1.

You should now have:
$CATALINA_HOME/lib/org/apache/jasper/compiler/AttributeParser.class
$CATALINA_HOME/lib/org/apache/jasper/compiler/Parser.class

3. Empty the $CATALINA_BASE/work directory

4. Start Tomcat

Please be aware that this patch in both source and binary form is for testing
purposes only and is not an official release from the ASF.

Let us know how you get on. Thanks in advance.

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

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



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

2010-01-30 Thread kkolinko
Author: kkolinko
Date: Sun Jan 31 04:10:41 2010
New Revision: 904977

URL: http://svn.apache.org/viewvc?rev=904977&view=rev
Log:
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=904977&r1=904976&r2=904977&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Jan 31 04:10:41 2010
@@ -135,14 +135,20 @@
 
 * Add some debug logging where exceptions where previously swallowed
   http://svn.apache.org/viewvc?rev=904834&view=rev
-  +1: mark
+  +1: markt, kkolinko
+  -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48629
   Get nested role search working when {1} is used in roleSearch
   Patch provided by Gabriel
   http://svn.apache.org/viewvc?rev=904914&view=rev
   +1: markt
-  -1: 
+  -1:
+  -0: kkolinko: I think using groupDN for {1} does not match the
+documentation, and I am not sure that it will work even for the OP of that 
issue,
+though I would like to know more about his configuration to be sure.
+See my comment #2 for that issue.
+
 
 * Fix various EL TCK failures
   http://svn.apache.org/viewvc?view=rev&rev=899653 (signatures)
@@ -157,6 +163,47 @@
   http://svn.apache.org/viewvc?view=rev&rev=899935 (ELException expected)
   http://svn.apache.org/viewvc?view=rev&rev=899949 (ignore whitespace on comp)
   +1: markt
+  +1: kkolinko:
+ 899653: OK.  We do not have @Deprecated annotations in those classes,
+  so the patch is about adding @SuppressWarnings("dep-ann")
+ 899769: With 899770 that backports the message string used here. 
+ 899770: OK
+ (Maybe better name for that message, because it says about arrays,
+ yet name is rather generic).
+ 899783: OK
+ 899788: OK
+ (Likewise, 
o.a.jasper.el.ELResolverImpl#getType(ELContext,Object,Object)
+ should probably throw a PropertyNotFoundException, instead of 
returning null.
+ I have no proof, though.)
+ 899792: OK
+ 899916: OK
+
+ 899918, 899919: OK, but there is probably an omission in the EL spec:
+ I do not see why we do conversion Enum->Enum via toString() call.
+
+ The EL spec chapter 1.18.6 'Coerce A to an Enum Type T' says
+"If A is a String call Enum.valueOf(T.getClass(), A) and return 
the result."
+ It does not say what to do if A is not a String. (There is no
+ explicit "Otherwise, error" statement below).
+
+ In 1.18.7 (aka ELSupport#coerceToType(Object, Class)) we throw
+ an error if A is not a String. Even if T has a PropertyEditor,
+ we do not do  editor.setAsText(obj.toString()),  as the spec does
+ not say to do so, but throw an exception.
+
+ (In 1.18.7 the spec says "Otherwise, apply T's PropertyEditor",
+ but PropertyEditor can be applied only is A is a String. Am I right?)
+
+ Without 899919 patch we will throw a ClassCaseException when object 
type
+ is a different type of enum, but other values are still converted
+ via toString() call.  The patch makes that behaviour consistent, even
+ if I do not understand why it is allowed.
+
+ 899935: OK
+ 899949: OK,
+ but why ValueExpressionImpl.equals() is implemented as comparing
+ the hash codes? What will happen with false positives?
+
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48627



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