(tomcat) branch main updated: More accurate check for WEB-INF and META-INF
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 90a6e20ee6 More accurate check for WEB-INF and META-INF 90a6e20ee6 is described below commit 90a6e20ee6e3a7d2bc7e213d8d92814b988c951e Author: remm AuthorDate: Wed Jan 15 10:42:11 2025 +0100 More accurate check for WEB-INF and META-INF Remove redundant checks already done in service(). Avoid ISE with invalid paths in the if header. Based on a patch submitted by Chenjp. --- .../apache/catalina/servlets/WebdavServlet.java| 26 ++ webapps/docs/changelog.xml | 4 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 280a325c2f..912a575ebf 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -610,6 +610,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 { currentPath = path; @@ -805,12 +809,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - // Properties which are to be displayed. List properties = new ArrayList<>(); // Propfind depth @@ -1197,12 +1195,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - WebResource resource = resources.getResource(path); if (!checkIfHeaders(req, resp, resource)) { resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED); @@ -1852,8 +1844,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * @return true if the resource specified is under a special path */ private boolean isSpecialPath(final String path) { -return !allowSpecialPaths && (path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF") || -path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF")); +if (!allowSpecialPaths) { +String upperCasePath = path.toUpperCase(Locale.ENGLISH); +if (upperCasePath.startsWith("/WEB-INF/") || upperCasePath.startsWith("/META-INF/") +|| upperCasePath.equals("/WEB-INF") || upperCasePath.equals("/META-INF")) { +return true; +} +} +return false; } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 75aa0b7ff3..bdb7984084 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -163,6 +163,10 @@ bloom archiveIndexStrategy of the Resources. (remm) + +Improve checks for WEB-INF and META-INF in +the WebDAV servlet. Based on a patch submitted by Chenjp. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: More accurate check for WEB-INF and META-INF
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 437da8 More accurate check for WEB-INF and META-INF 437da8 is described below commit 437da8712add015a4193da0f7d4d9248941e Author: remm AuthorDate: Wed Jan 15 10:42:11 2025 +0100 More accurate check for WEB-INF and META-INF Remove redundant checks already done in service(). Avoid ISE with invalid paths in the if header. Based on a patch submitted by Chenjp. --- .../apache/catalina/servlets/WebdavServlet.java| 26 ++ webapps/docs/changelog.xml | 4 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 0579b0a1ef..e97410f1f5 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -609,6 +609,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 { currentPath = path; @@ -804,12 +808,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - // Properties which are to be displayed. List properties = new ArrayList<>(); // Propfind depth @@ -1196,12 +1194,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - WebResource resource = resources.getResource(path); if (!checkIfHeaders(req, resp, resource)) { resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED); @@ -1851,8 +1843,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * @return true if the resource specified is under a special path */ private boolean isSpecialPath(final String path) { -return !allowSpecialPaths && (path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF") || -path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF")); +if (!allowSpecialPaths) { +String upperCasePath = path.toUpperCase(Locale.ENGLISH); +if (upperCasePath.startsWith("/WEB-INF/") || upperCasePath.startsWith("/META-INF/") +|| upperCasePath.equals("/WEB-INF") || upperCasePath.equals("/META-INF")) { +return true; +} +} +return false; } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 113945e462..4c54b39903 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -136,6 +136,10 @@ bloom archiveIndexStrategy of the Resources. (remm) + +Improve checks for WEB-INF and META-INF in +the WebDAV servlet. Based on a patch submitted by Chenjp. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: More accurate check for WEB-INF and META-INF
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 8a8b7bb31f More accurate check for WEB-INF and META-INF 8a8b7bb31f is described below commit 8a8b7bb31f9011d00886ada36b89fd03593901d6 Author: remm AuthorDate: Wed Jan 15 10:42:11 2025 +0100 More accurate check for WEB-INF and META-INF Remove redundant checks already done in service(). Avoid ISE with invalid paths in the if header. Based on a patch submitted by Chenjp. --- .../apache/catalina/servlets/WebdavServlet.java| 26 ++ webapps/docs/changelog.xml | 4 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 280a325c2f..912a575ebf 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -610,6 +610,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 { currentPath = path; @@ -805,12 +809,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - // Properties which are to be displayed. List properties = new ArrayList<>(); // Propfind depth @@ -1197,12 +1195,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - WebResource resource = resources.getResource(path); if (!checkIfHeaders(req, resp, resource)) { resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED); @@ -1852,8 +1844,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * @return true if the resource specified is under a special path */ private boolean isSpecialPath(final String path) { -return !allowSpecialPaths && (path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF") || -path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF")); +if (!allowSpecialPaths) { +String upperCasePath = path.toUpperCase(Locale.ENGLISH); +if (upperCasePath.startsWith("/WEB-INF/") || upperCasePath.startsWith("/META-INF/") +|| upperCasePath.equals("/WEB-INF") || upperCasePath.equals("/META-INF")) { +return true; +} +} +return false; } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 030aa12f3a..09b3f17951 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -136,6 +136,10 @@ bloom archiveIndexStrategy of the Resources. (remm) + +Improve checks for WEB-INF and META-INF in +the WebDAV servlet. Based on a patch submitted by Chenjp. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: More accurate check for WEB-INF and META-INF
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new f4708db271 More accurate check for WEB-INF and META-INF f4708db271 is described below commit f4708db2716c5d3bc31c6ac85bbb150283531eb0 Author: remm AuthorDate: Wed Jan 15 10:42:11 2025 +0100 More accurate check for WEB-INF and META-INF Remove redundant checks already done in service(). Avoid ISE with invalid paths in the if header. Based on a patch submitted by Chenjp. --- .../apache/catalina/servlets/WebdavServlet.java| 26 ++ webapps/docs/changelog.xml | 4 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 4491dce429..f2fbc22ec1 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -610,6 +610,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 { currentPath = path; @@ -805,12 +809,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - // Properties which are to be displayed. List properties = new ArrayList<>(); // Propfind depth @@ -1197,12 +1195,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String path = getRelativePath(req); -// Exclude any resource in the /WEB-INF and /META-INF subdirectories -if (isSpecialPath(path)) { -resp.sendError(WebdavStatus.SC_FORBIDDEN); -return; -} - WebResource resource = resources.getResource(path); if (!checkIfHeaders(req, resp, resource)) { resp.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED); @@ -1852,8 +1844,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * @return true if the resource specified is under a special path */ private boolean isSpecialPath(final String path) { -return !allowSpecialPaths && (path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF") || -path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF")); +if (!allowSpecialPaths) { +String upperCasePath = path.toUpperCase(Locale.ENGLISH); +if (upperCasePath.startsWith("/WEB-INF/") || upperCasePath.startsWith("/META-INF/") +|| upperCasePath.equals("/WEB-INF") || upperCasePath.equals("/META-INF")) { +return true; +} +} +return false; } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 8d2d0f9a00..0e3359e3c1 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -136,6 +136,10 @@ bloom archiveIndexStrategy of the Resources. (remm) + +Improve checks for WEB-INF and META-INF in +the WebDAV servlet. Based on a patch submitted by Chenjp. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [PR] Webdav special path handling fix [tomcat]
Chenjp commented on PR #807: URL: https://github.com/apache/tomcat/pull/807#issuecomment-2592561309 > I see a few things to cleanup as well. +1. rename method is better. about testcase: pls try to cover allowSpecialPaths and nonroot webdav path. Current testcase is not enough. -- 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. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 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
Re: [PR] Webdav special path handling fix [tomcat]
rmaucher commented on PR #807: URL: https://github.com/apache/tomcat/pull/807#issuecomment-2592078702 Ok, the check should be similar to what it is in StandardContextValve. I won't rename the method however, and I see a few things to cleanup as well. -- 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. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 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
Re: [PR] webdav testcase for special path [tomcat]
rmaucher commented on PR #808: URL: https://github.com/apache/tomcat/pull/808#issuecomment-2594731714 This is trivial, mostly already tested, so I did not bother adding them. -- 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. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 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 69537] SPAM SPAM SPAM SPAM
https://bz.apache.org/bugzilla/show_bug.cgi?id=69537 Chuck Caldarale changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID URL|https://kingsedu.ac/best-db | |a-in-uae/ | Summary|Lead the Future of Business |SPAM SPAM SPAM SPAM |with a DBA from King’s | |Business School, UAE| -- 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-tck) 01/02: If deployment fails, ensure that the client uses the correct URL
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat-tck.git commit c383bf0c82469fb0c7a172425ba2aca2f8ce3d03 Author: Mark Thomas AuthorDate: Wed Jan 15 14:44:31 2025 + If deployment fails, ensure that the client uses the correct URL Prior to this change the client would use ://:// if the deployment was successful but ://: if the deployment failed. Now the client always uses ://:// --- .../websocket/TomcatWebSocketTckConfiguration.java | 65 ++ 1 file changed, 65 insertions(+) diff --git a/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java b/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java index 13de86c..c8a79fa 100644 --- a/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java +++ b/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java @@ -19,14 +19,22 @@ package org.apache.tomcat.tck.websocket; import java.lang.reflect.Field; import java.net.URL; +import org.apache.catalina.Container; import org.apache.catalina.Host; +import org.apache.catalina.LifecycleState; import org.apache.catalina.connector.Connector; import org.apache.catalina.startup.Tomcat; import org.apache.tomcat.util.net.SSLHostConfig; import org.apache.tomcat.util.net.SSLHostConfigCertificate; import org.apache.tomcat.util.net.SSLHostConfigCertificate.Type; import org.apache.tomcat.util.scan.StandardJarScanner; +import org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext; +import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData; +import org.jboss.arquillian.container.spi.client.protocol.metadata.Servlet; +import org.jboss.arquillian.container.spi.event.container.AfterDeploy; import org.jboss.arquillian.container.spi.event.container.BeforeDeploy; +import org.jboss.arquillian.core.api.Instance; +import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.core.api.annotation.Observes; import org.jboss.arquillian.core.spi.LoadableExtension; import org.jboss.arquillian.container.tomcat.embedded.EmbeddedContextConfig; @@ -41,6 +49,10 @@ public class TomcatWebSocketTckConfiguration implements LoadableExtension { public static class WebSocketObserver { +@Inject +private Instance protocolMetadata; + + public void configureContext(@Observes final BeforeDeploy beforeDeploy) { Tomcat10EmbeddedContainer container = (Tomcat10EmbeddedContainer) beforeDeploy.getDeployableContainer(); try { @@ -100,8 +112,61 @@ public class TomcatWebSocketTckConfiguration implements LoadableExtension { throw new RuntimeException(e); } } + + +public void something(@Observes final AfterDeploy afterDeploy) { +Tomcat10EmbeddedContainer container = (Tomcat10EmbeddedContainer) afterDeploy.getDeployableContainer(); +try { +// Obtain reference to Tomcat instance +Field tomcatField = Tomcat10EmbeddedContainer.class.getDeclaredField("tomcat"); +tomcatField.setAccessible(true); +Tomcat tomcat = (Tomcat) tomcatField.get(container); + +// There should be a single context +Container[] contexts = tomcat.getHost().findChildren(); +if (contexts.length == 1) { +Container context = contexts[0]; +if (LifecycleState.STOPPED == context.getState()) { +/* + * A LifecycleState of STOPPED means that the Context failed to deploy. + * + * To clean up resources associated with a failed deployment, stop() is called automatically if + * start() fails. One of the consequences of this is that all the Servlet mappings are removed + * from the Context. + * + * Because there are no servlet mappings, the HTTPContext generated in + * Tomcat10EmbeddedContainer.deploy() will not have any Servlet mappings. The + * URLResourceProvider uses the Servlet mappings to provide the context path for the URL that + * the client uses for the tests. + * + * For the WebSocket tests, the client needs to use the context path for every request + * regardless of whether the web application deployed successfully or not. Therefore, if the web + * application failed to deploy we manually add a default Servlet to the HTTPContext for the +
(tomcat-tck) branch 11.0.x updated (daa96b0 -> ac37578)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat-tck.git from daa96b0 Update to latest snapshot new c383bf0 If deployment fails, ensure that the client uses the correct URL new ac37578 Increment the Tomcat version under test 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: pom.xml| 2 +- .../websocket/TomcatWebSocketTckConfiguration.java | 65 ++ 2 files changed, 66 insertions(+), 1 deletion(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat-tck) 02/02: Increment the Tomcat version under test
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat-tck.git commit ac37578ec03a61e2b13013950a1940a18e3bbfdd Author: Mark Thomas AuthorDate: Wed Jan 15 15:26:09 2025 + Increment the Tomcat version under test --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78d9afc..3d3b1bd 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 17 -11.0.2-SNAPSHOT +11.0.3-SNAPSHOT 4 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69537] New: Lead the Future of Business with a DBA from King’s Business School, UAE
https://bz.apache.org/bugzilla/show_bug.cgi?id=69537 Bug ID: 69537 Summary: Lead the Future of Business with a DBA from King’s Business School, UAE Product: Tomcat Native Version: 2.0.6 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Documentation Assignee: dev@tomcat.apache.org Reporter: abhishekkings...@gmail.com Target Milestone: --- A DBA from King’s Business School, UAE helps you master research methodologies that transform industries. Our Online DBA program allows professionals to pursue academic excellence while continuing to build their careers.https://kingsedu.ac/best-dba-in-uae/ -- 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
[Bug 69537] Lead the Future of Business with a DBA from King’s Business School, UAE
https://bz.apache.org/bugzilla/show_bug.cgi?id=69537 King's Business School changed: What|Removed |Added URL||https://kingsedu.ac/best-db ||a-in-uae/ OS||All -- 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-tck) branch main updated: If deployment fails, ensure that the client uses the correct URL
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-tck.git The following commit(s) were added to refs/heads/main by this push: new 1b6769f If deployment fails, ensure that the client uses the correct URL 1b6769f is described below commit 1b6769f6bac3b71fb79eed8da66c7ce1d0a3e50d Author: Mark Thomas AuthorDate: Wed Jan 15 14:44:31 2025 + If deployment fails, ensure that the client uses the correct URL Prior to this change the client would use ://:// if the deployment was successful but ://: if the deployment failed. Now the client always uses ://:// --- .../websocket/TomcatWebSocketTckConfiguration.java | 65 ++ 1 file changed, 65 insertions(+) diff --git a/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java b/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java index 13de86c..c8a79fa 100644 --- a/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java +++ b/websocket-tck/src/test/java/org/apache/tomcat/tck/websocket/TomcatWebSocketTckConfiguration.java @@ -19,14 +19,22 @@ package org.apache.tomcat.tck.websocket; import java.lang.reflect.Field; import java.net.URL; +import org.apache.catalina.Container; import org.apache.catalina.Host; +import org.apache.catalina.LifecycleState; import org.apache.catalina.connector.Connector; import org.apache.catalina.startup.Tomcat; import org.apache.tomcat.util.net.SSLHostConfig; import org.apache.tomcat.util.net.SSLHostConfigCertificate; import org.apache.tomcat.util.net.SSLHostConfigCertificate.Type; import org.apache.tomcat.util.scan.StandardJarScanner; +import org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext; +import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData; +import org.jboss.arquillian.container.spi.client.protocol.metadata.Servlet; +import org.jboss.arquillian.container.spi.event.container.AfterDeploy; import org.jboss.arquillian.container.spi.event.container.BeforeDeploy; +import org.jboss.arquillian.core.api.Instance; +import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.core.api.annotation.Observes; import org.jboss.arquillian.core.spi.LoadableExtension; import org.jboss.arquillian.container.tomcat.embedded.EmbeddedContextConfig; @@ -41,6 +49,10 @@ public class TomcatWebSocketTckConfiguration implements LoadableExtension { public static class WebSocketObserver { +@Inject +private Instance protocolMetadata; + + public void configureContext(@Observes final BeforeDeploy beforeDeploy) { Tomcat10EmbeddedContainer container = (Tomcat10EmbeddedContainer) beforeDeploy.getDeployableContainer(); try { @@ -100,8 +112,61 @@ public class TomcatWebSocketTckConfiguration implements LoadableExtension { throw new RuntimeException(e); } } + + +public void something(@Observes final AfterDeploy afterDeploy) { +Tomcat10EmbeddedContainer container = (Tomcat10EmbeddedContainer) afterDeploy.getDeployableContainer(); +try { +// Obtain reference to Tomcat instance +Field tomcatField = Tomcat10EmbeddedContainer.class.getDeclaredField("tomcat"); +tomcatField.setAccessible(true); +Tomcat tomcat = (Tomcat) tomcatField.get(container); + +// There should be a single context +Container[] contexts = tomcat.getHost().findChildren(); +if (contexts.length == 1) { +Container context = contexts[0]; +if (LifecycleState.STOPPED == context.getState()) { +/* + * A LifecycleState of STOPPED means that the Context failed to deploy. + * + * To clean up resources associated with a failed deployment, stop() is called automatically if + * start() fails. One of the consequences of this is that all the Servlet mappings are removed + * from the Context. + * + * Because there are no servlet mappings, the HTTPContext generated in + * Tomcat10EmbeddedContainer.deploy() will not have any Servlet mappings. The + * URLResourceProvider uses the Servlet mappings to provide the context path for the URL that + * the client uses for the tests. + * + * For the WebSocket tests, the client needs to use the context path for every request + * regardless of whether the web application deployed suc
[PR] Webdav special path handling fix [tomcat]
Chenjp opened a new pull request, #807: URL: https://github.com/apache/tomcat/pull/807 1. fix: "/web-information.xml" is not a special path. 2. method name refactoring: from isSpecialPath to checkSpecialPath. -- 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. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 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
Re: [PR] Webdav special path handling fix [tomcat]
rmaucher closed pull request #807: Webdav special path handling fix URL: https://github.com/apache/tomcat/pull/807 -- 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. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 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
Re: [PR] Webdav special path handling fix [tomcat]
rmaucher commented on PR #807: URL: https://github.com/apache/tomcat/pull/807#issuecomment-2592187806 I did not pick up the test since it doesn't add much. Also because of: File appDir = new File(getBuildDirectory(), "webapps" + contextPath); try (FileWriter fw = new FileWriter(new File(appDir, "WEB-INFORMATION.xml"))) { -- 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. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 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
Buildbot failure in on tomcat-9.0.x
Build status: BUILD FAILED: failed compile (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/37/builds/1233 Blamelist: remm Build Text: failed compile (failure) Status Detected: new failure Build Source Stamp: [branch 9.0.x] 437da8712add015a4193da0f7d4d9248941e Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 2 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org