diff options
Diffstat (limited to 'juick-xmpp/src/main')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java | 2 | ||||
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java b/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java index 28dab1ef..ac33acc5 100644 --- a/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java +++ b/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java @@ -1,6 +1,6 @@ package com.juick.components.configuration; -import org.apache.commons.lang3.CharEncoding; +import org.apache.commons.codec.CharEncoding; import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java index 99df858e..a5d71be1 100644 --- a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java +++ b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java @@ -5,7 +5,7 @@ import com.juick.components.s2s.util.DialbackUtils; import com.juick.xmpp.extensions.StreamError; import com.juick.xmpp.extensions.StreamFeatures; import com.juick.xmpp.utils.XmlUtils; -import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.text.RandomStringGenerator; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -32,11 +32,12 @@ public class ConnectionOut extends Connection implements Runnable { public String to; String checkSID = null; String dbKey = null; + RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange('a', 'z').build(); public ConnectionOut(XMPPServer xmpp, String hostname) throws CertificateException, UnrecoverableKeyException, NoSuchAlgorithmException, XmlPullParserException, KeyManagementException, KeyStoreException, IOException { super(xmpp); to = hostname; - dbKey = DialbackUtils.generateDialbackKey(RandomStringUtils.randomAscii(15), to, xmpp.HOSTNAME, streamID); + dbKey = DialbackUtils.generateDialbackKey(generator.generate(15), to, xmpp.HOSTNAME, streamID); } public ConnectionOut(XMPPServer xmpp, String hostname, String checkSID, String dbKey) throws Exception { |