james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1078731 - /james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
Date Mon, 07 Mar 2011 10:32:02 GMT
Author: felixk
Date: Mon Mar  7 10:32:01 2011
New Revision: 1078731

URL: http://svn.apache.org/viewvc?rev=1078731&view=rev
Log:
Fix PROTOCOLS-18.
Copy the values for each array element will generate a new string object.

Modified:
    james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java

Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java?rev=1078731&r1=1078730&r2=1078731&view=diff
==============================================================================
--- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
(original)
+++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
Mon Mar  7 10:32:01 2011
@@ -43,7 +43,13 @@ public abstract class AbstractSSLAwareCh
     public AbstractSSLAwareChannelPipelineFactory(int timeout,
             int maxConnections, int maxConnectsPerIp, ChannelGroup group, String[] enabledCipherSuites)
{
         this(timeout, maxConnections, maxConnectsPerIp, group);
-        this.enabledCipherSuites  = enabledCipherSuites;
+        
+        // We need to copy the String array becuase of possible security issues.
+        // See https://issues.apache.org/jira/browse/PROTOCOLS-18
+        this.enabledCipherSuites = new String[enabledCipherSuites.length];
+        for (int i = 0; i < enabledCipherSuites.length; i++) {
+            this.enabledCipherSuites[i] = new String(enabledCipherSuites[i]);
+        }
     }
 
     



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message