activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: Minor refactor of OpenWireProtocolManager In addDestination() put the security check right before actual queue creation. That'll also fix BasicSecurityTest regression.
Date Mon, 31 Aug 2015 02:51:07 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 7f3c9dc1f -> ea3fef4e5


Minor refactor of OpenWireProtocolManager
  In addDestination() put the security check right before
  actual queue creation. That'll also fix BasicSecurityTest
  regression.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/638674bc
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/638674bc
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/638674bc

Branch: refs/heads/master
Commit: 638674bce0a5f3e722aa2e8c1b7bd95c35f346b1
Parents: 7f3c9dc
Author: Howard Gao <howard.gao@gmail.com>
Authored: Mon Aug 31 10:37:28 2015 +0800
Committer: Howard Gao <howard.gao@gmail.com>
Committed: Mon Aug 31 10:37:28 2015 +0800

----------------------------------------------------------------------
 .../protocol/openwire/OpenWireProtocolManager.java   | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/638674bc/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
index c410b77..04be7aa 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
@@ -572,16 +572,15 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>,
No
       ActiveMQDestination dest = info.getDestination();
       if (dest.isQueue()) {
          SimpleString qName = OpenWireUtil.toCoreAddress(dest);
-         if (connection.getState().getInfo() != null) {
-
-            CheckType checkType = dest.isTemporary() ? CheckType.CREATE_NON_DURABLE_QUEUE
: CheckType.CREATE_DURABLE_QUEUE;
-            server.getSecurityStore().check(qName, checkType, connection);
-
-            server.checkQueueCreationLimit(connection.getUsername());
-         }
-
          QueueBinding binding = (QueueBinding) server.getPostOffice().getBinding(qName);
          if (binding == null) {
+            if (connection.getState().getInfo() != null) {
+
+               CheckType checkType = dest.isTemporary() ? CheckType.CREATE_NON_DURABLE_QUEUE
: CheckType.CREATE_DURABLE_QUEUE;
+               server.getSecurityStore().check(qName, checkType, connection);
+
+               server.checkQueueCreationLimit(connection.getUsername());
+            }
             ConnectionInfo connInfo = connection.getState().getInfo();
             this.server.createQueue(qName, qName, null, connInfo == null ? null : SimpleString.toSimpleString(connInfo.getUserName()),
false, dest.isTemporary());
          }


Mime
View raw message