activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r798785 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
Date Wed, 29 Jul 2009 05:24:24 GMT
Author: rajdavies
Date: Wed Jul 29 05:24:24 2009
New Revision: 798785

URL: http://svn.apache.org/viewvc?rev=798785&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-2335

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java?rev=798785&r1=798784&r2=798785&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
Wed Jul 29 05:24:24 2009
@@ -77,8 +77,12 @@
         super.addConnection(context, info);
 
         ActiveMQTopic topic = AdvisorySupport.getConnectionAdvisoryTopic();
-        fireAdvisory(context, topic, info);
-        connections.put(info.getConnectionId(), info);
+        //do not distribute usernames or passwords in advisory
+        ConnectionInfo copy = info.copy();
+        copy.setUserName("");
+        copy.setPassword("");
+        fireAdvisory(context, topic, copy);
+        connections.put(copy.getConnectionId(), copy);
     }
 
     public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws
Exception {



Mime
View raw message