You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/05/31 16:58:28 UTC

[tomcat] branch 8.5.x updated (d2446e4818 -> 65d73d2aab)

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

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


    from d2446e4818 Bug 66618: add longDate attribute to XML in directory listing
     new 061f8a27fd Simplify code
     new 65d73d2aab Fix BZ 66621 - remove expired locks from correct collection

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 ++----
 webapps/docs/changelog.xml                           | 4 ++++
 2 files changed, 6 insertions(+), 4 deletions(-)


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


[tomcat] 01/02: Simplify code

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 061f8a27fdcb9f77c9a295d6969e059ddaaee4a3
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed May 31 17:30:12 2023 +0100

    Simplify code
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java
index 1716437af7..6f09cf5c7c 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -871,9 +871,7 @@ public class WebdavServlet extends DefaultServlet {
 
         int lockDuration = DEFAULT_TIMEOUT;
         String lockDurationStr = req.getHeader("Timeout");
-        if (lockDurationStr == null) {
-            lockDuration = DEFAULT_TIMEOUT;
-        } else {
+        if (lockDurationStr != null) {
             int commaPos = lockDurationStr.indexOf(',');
             // If multiple timeouts, just use the first
             if (commaPos != -1) {


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


[tomcat] 02/02: Fix BZ 66621 - remove expired locks from correct collection

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 65d73d2aabd5abeceac5158ffb233efc047f4549
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed May 31 17:56:36 2023 +0100

    Fix BZ 66621 - remove expired locks from correct collection
    
    https://bz.apache.org/bugzilla/show_bug.cgi?id=66621
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 webapps/docs/changelog.xml                           | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java
index 6f09cf5c7c..1ef73559a2 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1059,7 +1059,7 @@ public class WebdavServlet extends DefaultServlet {
                 List<String> lockPaths = new ArrayList<>();
                 for (LockInfo currentLock : collectionLocks) {
                     if (currentLock.hasExpired()) {
-                        resourceLocks.remove(currentLock.path);
+                        collectionLocks.remove(currentLock);
                         continue;
                     }
                     if (currentLock.path.startsWith(lock.path) &&
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 402c2745a1..552fa08471 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -124,6 +124,10 @@
        listings produced by the default servlet to enable sorting in the XSLT.
        Pull request <pr>622</pr> by Alex Kachanov. (markt)
       </add>
+      <fix>
+        <bug>66621</bug>: Attempts to lock a collection with WebDAV may
+        incorrectly fail if a child collection has an expired lock. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">


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