Merge pull request #603 from jbonofre/AMQ-8060
[AMQ-8060] Re add allowLinkStealing on transport connector for backward compatibility
diff --git a/activemq-shiro/src/main/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermission.java b/activemq-shiro/src/main/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermission.java
index 38a514c..92854cd 100644
--- a/activemq-shiro/src/main/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermission.java
+++ b/activemq-shiro/src/main/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermission.java
@@ -59,18 +59,25 @@
} else {
Set<String> thisPart = getParts().get(i);
- for (String token : thisPart) {
- if (token.equals(WILDCARD_TOKEN)) {
- continue;
+ // all tokens from otherPart must pass at least one token from thisPart
+ for (String otherToken : otherPart) {
+ if (!caseSensitive) {
+ otherToken = otherToken.toLowerCase();
}
- for (String otherToken : otherPart) {
- if (!caseSensitive) {
- otherToken = otherToken.toLowerCase();
+ boolean otherIsMatched = false;
+ for (String token : thisPart) {
+ if (token.equals(WILDCARD_TOKEN)) {
+ otherIsMatched = true;
+ break;
}
- if (!matches(token, otherToken)) {
- return false;
+ if (matches(token, otherToken)) {
+ otherIsMatched = true;
+ break;
}
- }
+ }
+ if (!otherIsMatched) {
+ return false;
+ }
}
i++;
}
diff --git a/activemq-shiro/src/test/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermissionTest.java b/activemq-shiro/src/test/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermissionTest.java
index 515aeeb..a246722 100644
--- a/activemq-shiro/src/test/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermissionTest.java
+++ b/activemq-shiro/src/test/java/org/apache/activemq/shiro/authz/ActiveMQWildcardPermissionTest.java
@@ -117,6 +117,10 @@
assertNoMatch("*:ActiveMQ*", "topic:TEST:*");
assertMatch("topic:ActiveMQ.Advisory*", "topic:ActiveMQ.Advisory.Connection:create");
assertMatch("foo?ar", "foobar");
+
+ assertMatch("queue:*:read,write", "queue:testqueue:read");
+ assertMatch("queue:*:read,write", "queue:test*:read,write");
+ assertNoMatch("queue:*:read,write", "queue:*:read,write,delete");
}
protected static void assertMatch(String pattern, String value) {
diff --git a/activemq-web-console/src/main/webapp/decorators/header.jsp b/activemq-web-console/src/main/webapp/decorators/header.jsp
index 5b10793..99bd1d4 100644
--- a/activemq-web-console/src/main/webapp/decorators/header.jsp
+++ b/activemq-web-console/src/main/webapp/decorators/header.jsp
@@ -62,7 +62,9 @@
</div>
<div id="site-quicklinks"><P>
<a href="http://activemq.apache.org/support.html"
- title="Get help and support using Apache ActiveMQ">Support</a></p>
+ title="Get help and support using Apache ActiveMQ">Support</a>
+ |
+ <a href="logout.jsp" title="Logout">Logout</a></p>
</div>
</div>
diff --git a/activemq-web-console/src/main/webapp/logout.jsp b/activemq-web-console/src/main/webapp/logout.jsp
new file mode 100644
index 0000000..e1bd0bf
--- /dev/null
+++ b/activemq-web-console/src/main/webapp/logout.jsp
@@ -0,0 +1,40 @@
+<%--
+ 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.
+--%>
+<%
+response.setStatus(401);
+%>
+<%@include file="WEB-INF/jspf/headertags.jspf" %>
+<html>
+<head>
+<c:set var="pageTitle" value="ActiveMQ Console"/>
+
+<%@include file="decorators/head.jsp" %>
+</head>
+<body>
+
+<%@include file="decorators/header.jsp" %>
+
+<h2>You have been logout</h2>
+
+<p>
+Go back to <a href="<c:url value='/index.jsp'/>">Home</a> to logon again.
+</p>
+
+<%@include file="decorators/footer.jsp" %>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/assembly/pom.xml b/assembly/pom.xml
index e4f23d9..849351b 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -467,6 +467,18 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
+
+ <!-- JAXB (for JDK11) -->
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.2.11</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jaxb</groupId>
+ <artifactId>jaxb-runtime</artifactId>
+ <version>2.2.11</version>
+ </dependency>
</dependencies>
<build>
diff --git a/assembly/src/main/descriptors/common-bin.xml b/assembly/src/main/descriptors/common-bin.xml
index 17ac1f9..dca3780 100644
--- a/assembly/src/main/descriptors/common-bin.xml
+++ b/assembly/src/main/descriptors/common-bin.xml
@@ -146,6 +146,8 @@
<include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
<include>${pom.groupId}:activemq-web</include>
<include>org.fusesource.hawtbuf:hawtbuf</include>
+ <include>javax.xml.bind:jaxb-api</include>
+ <include>org.glassfish.jaxb:jaxb-runtime</include>
</includes>
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
diff --git a/pom.xml b/pom.xml
index e14d563..e74fe80 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,13 +73,13 @@
<httpcore-version>4.4.13</httpcore-version>
<insight-version>1.2.0.Beta4</insight-version>
<jackson-version>2.9.10</jackson-version>
- <jackson-databind-version>2.9.10.6</jackson-databind-version>
+ <jackson-databind-version>2.9.10.7</jackson-databind-version>
<jasypt-version>1.9.3</jasypt-version>
<jaxb-bundle-version>2.2.11_1</jaxb-bundle-version>
<jetty9-version>9.4.35.v20201120</jetty9-version>
<jetty-version>${jetty9-version}</jetty-version>
<jmdns-version>3.4.1</jmdns-version>
- <tomcat-api-version>9.0.39</tomcat-api-version>
+ <tomcat-api-version>9.0.41</tomcat-api-version>
<jettison-version>1.4.1</jettison-version>
<jmock-version>2.5.1</jmock-version>
<jolokia-version>1.6.2</jolokia-version>
@@ -126,7 +126,7 @@
<xmlbeans-version>3.1.0</xmlbeans-version>
<xmlbeans-bundle-version>2.6.0_2</xmlbeans-bundle-version>
<xpp3-version>1.1.4c</xpp3-version>
- <xstream-version>1.4.14</xstream-version>
+ <xstream-version>1.4.15</xstream-version>
<xbean-version>4.18</xbean-version>
<xerces-version>2.12.0</xerces-version>
<jaxb-basics-version>0.6.4</jaxb-basics-version>