Re: [tomcat] branch main updated: Fix BZ 65390 - revert code removal made in error

2021-06-19 Thread Mark Thomas

On 18/06/2021 20:07, Christopher Schultz wrote:

Mark,

s/Ctach/Catch/ig


Tx. Fixing...

Mark



-chris

On 6/18/21 11:55, ma...@apache.org wrote:

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
  new a65466f  Fix BZ 65390 - revert code removal made in error
a65466f is described below

commit a65466f13beed2fe65f5c569cd3b2f706406
Author: Mark Thomas 
AuthorDate: Fri Jun 18 16:54:45 2021 +0100

 Fix BZ 65390 - revert code removal made in error
 https://bz.apache.org/bugzilla/show_bug.cgi?id=65390
 The code is required and should not have been removed.
 Test case based one code provided by tk...@ai-ag.de
---
  java/org/apache/jasper/compiler/Generator.java |  4 
  test/org/apache/jasper/compiler/TestGenerator.java | 12 ++-
  test/webapp/WEB-INF/tags/bug65390.tag  | 20 
++

  test/webapp/bug6/bug65390-empty.jsp    | 17 +++
  test/webapp/bug6/bug65390.jsp  | 24 
++

  webapps/docs/changelog.xml |  5 +
  6 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java

index 66ff231..339de1f 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -3322,6 +3322,10 @@ class Generator {
  boolean tmpIsFragment = isFragment;
  isFragment = true;
  String pushBodyCountVarSave = pushBodyCountVar;
+    if (pushBodyCountVar != null) {
+    // Use a fixed name for push body count, to simplify 
code gen

+    pushBodyCountVar = "_jspx_push_body_count";
+    }
  visitBody(n);
  out = outSave;
  parent = tmpParent;
diff --git a/test/org/apache/jasper/compiler/TestGenerator.java 
b/test/org/apache/jasper/compiler/TestGenerator.java

index c37451c..3b53bc1 100644
--- a/test/org/apache/jasper/compiler/TestGenerator.java
+++ b/test/org/apache/jasper/compiler/TestGenerator.java
@@ -435,7 +435,7 @@ public class TestGenerator extends TomcatBaseTest {
  }
  @Test
-    public void testTryCtachFinally02 () throws Exception {
+    public void testTryCtachFinally02() throws Exception {
  doTestJsp("try-catch-finally-02.jsp");
  }
@@ -970,6 +970,16 @@ public class TestGenerator extends TomcatBaseTest {
  Assert.assertEquals(body.toString(), 
HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);

  }
+    @Test
+    public void testBug65390() throws Exception {
+    getTomcatInstanceTestWebapp(false, true);
+
+    ByteChunk body = new ByteChunk();
+    int rc = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug65390.jsp", body, null);

+
+    Assert.assertEquals(body.toString(), 
HttpServletResponse.SC_OK, rc);

+    }
+
  private void doTestJsp(String jspName) throws Exception {
  doTestJsp(jspName, HttpServletResponse.SC_OK);
  }
diff --git a/test/webapp/WEB-INF/tags/bug65390.tag 
b/test/webapp/WEB-INF/tags/bug65390.tag

new file mode 100644
index 000..51d38c8
--- /dev/null
+++ b/test/webapp/WEB-INF/tags/bug65390.tag
@@ -0,0 +1,20 @@
+<%--
+ 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 permissions and
+  limitations under the License.
+--%>
+<%@ tag language="java" pageEncoding="UTF-8" body-content="scriptless"%>
+<%
+getJspBody().invoke(null);
+%>
\ No newline at end of file
diff --git a/test/webapp/bug6/bug65390-empty.jsp 
b/test/webapp/bug6/bug65390-empty.jsp

new file mode 100644
index 000..2f7bb10
--- /dev/null
+++ b/test/webapp/bug6/bug65390-empty.jsp
@@ -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.  

[tomcat] branch main updated (a65466f -> 98d61c1)

2021-06-19 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from a65466f  Fix BZ 65390 - revert code removal made in error
 add 98d61c1  Fix typos

No new revisions were added by this update.

Summary of changes:
 java/org/apache/jasper/compiler/Generator.java | 2 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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



[tomcat] branch 10.0.x updated: Fix typos

2021-06-19 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 444be7d  Fix typos
444be7d is described below

commit 444be7d46aee5c19a6630c4814781ec16be564e7
Author: Mark Thomas 
AuthorDate: Sat Jun 19 10:29:33 2021 +0100

Fix typos
---
 java/org/apache/jasper/compiler/Generator.java | 2 +-
 test/org/apache/jasper/compiler/TestGenerator.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 339de1f..eea8225 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1860,7 +1860,7 @@ class Generator {
 out.printil("jakarta.servlet.jsp.PageContext pageContext = 
_jspx_page_context;");
 }
 // Only need to define out if the tag has a non-empty body,
-// implements TryCtachFinally or uses
+// implements TryCatchFinally or uses
 // ... nodes
 if (!n.hasEmptyBody() || n.implementsTryCatchFinally() || 
n.getNamedAttributeNodes().size() > 0) {
 out.printil("jakarta.servlet.jsp.JspWriter out = 
_jspx_page_context.getOut();");
diff --git a/test/org/apache/jasper/compiler/TestGenerator.java 
b/test/org/apache/jasper/compiler/TestGenerator.java
index 3b53bc1..4cbaf2b 100644
--- a/test/org/apache/jasper/compiler/TestGenerator.java
+++ b/test/org/apache/jasper/compiler/TestGenerator.java
@@ -435,7 +435,7 @@ public class TestGenerator extends TomcatBaseTest {
 }
 
 @Test
-public void testTryCtachFinally02() throws Exception {
+public void testTryCatchFinally02() throws Exception {
 doTestJsp("try-catch-finally-02.jsp");
 }
 

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



[GitHub] [tomcat] cklein05 closed pull request #420: UserDatabaseRealm does not rely on cached roles only

2021-06-19 Thread GitBox


cklein05 closed pull request #420:
URL: https://github.com/apache/tomcat/pull/420


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[Bug 65391] New: Additional user attributes queried by (some) realms

2021-06-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65391

Bug ID: 65391
   Summary: Additional user attributes queried by (some) realms
   Product: Tomcat 10
   Version: 10.1.0-M1
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: c.kl...@datagis.com
  Target Milestone: --

This enhancement adds support for additional user attributes to be queried by
MemoryRealm, UserDatabaseRealm, DataSourceRealm and JNDIRealm.

There's a PR in GitGub at https://github.com/apache/tomcat/pull/428

-- 
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