This is an automated email from the ASF dual-hosted git repository. remm 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 6b2911bb41 Evaluate to false for any invalid paths to avoid NPE 6b2911bb41 is described below commit 6b2911bb41a1c46338dbc80b08d7223e012408a6 Author: remm <r...@apache.org> AuthorDate: Fri Jul 4 16:27:55 2025 +0200 Evaluate to false for any invalid paths to avoid NPE Found by coverity. --- java/org/apache/catalina/servlets/WebdavServlet.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index b83ecdbd9e..4057e3e062 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -680,6 +680,10 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen if (hrefs.hasNext()) { currentHref = hrefs.next(); currentPath = getPathFromHref(currentHref, request); + if (currentPath == null) { + // The path was invalid + return false; + } currentWebResource = resources.getResource(currentPath); } else { break; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org