Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Setting the xmpp stringprep. #1149

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jicofo/src/main/kotlin/org/jitsi/jicofo/xmpp/Smack.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import org.jivesoftware.smack.parsing.ExceptionLoggingCallback
import org.jivesoftware.smack.provider.ProviderManager
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy
import org.jxmpp.JxmppContext
import org.jxmpp.jid.impl.JidCreate
import org.jxmpp.stringprep.rocksxmppprecis.RocksXmppPrecisStringprep

fun initializeSmack() {
Expand All @@ -66,6 +67,9 @@ fun initializeSmack() {
System.setProperty("jdk.xml.entityReplacementLimit", "0")

// The default SimpleXmppStringrep is very permissive and allows some invalid JIDs that we don't want to allow.
// Force XmppStringPrepUtil to load before we override the context, otherwise it gets reverted.
// https://github.com/igniterealtime/jxmpp/pull/44
JidCreate.from("example.com")
JxmppContext.setDefaultXmppStringprep(RocksXmppPrecisStringprep.INSTANCE)

SmackConfiguration.setDefaultReplyTimeout(15000)
Expand Down
Loading