Skip to content

Commit

Permalink
Add a config flag to allow disabling JitsiXmppStringprep.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev committed Apr 26, 2024
1 parent fac75d1 commit b1c8713
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class XmppConfig private constructor() {
.convertFrom<List<String>> { l -> l.map { JidCreate.domainBareFrom(it) } }
}

val useJitsiJidValidation: Boolean by config {
"jicofo.xmpp.use-jitsi-jid-validation".from(newConfig)
}

companion object {
@JvmField
val service = XmppServiceConnectionConfig()
Expand Down
3 changes: 3 additions & 0 deletions jicofo-selector/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ jicofo {
}

xmpp {
// Whether to use JitsiXmppStringprep to validate JIDs. If set to false uses the default validation in Smack.
use-jitsi-jid-validation = true

// The separate XMPP connection used for communication with clients (endpoints).
client {
enabled = true
Expand Down
2 changes: 1 addition & 1 deletion jicofo/src/main/kotlin/org/jitsi/jicofo/xmpp/Smack.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import org.jivesoftware.smack.SmackConfiguration
import org.jivesoftware.smack.provider.ProviderManager

fun initializeSmack() {
org.jitsi.xmpp.Smack.initialize()
org.jitsi.xmpp.Smack.initialize(XmppConfig.config.useJitsiJidValidation)

SmackConfiguration.setDefaultReplyTimeout(15000)

Expand Down

0 comments on commit b1c8713

Please sign in to comment.