Use libidn for stringprep

Stephen Paul Weber created

Which actually validates according to spec instead of just being lazy.

Change summary

build.gradle                                                             | 1 
src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 1 
2 files changed, 2 insertions(+)

Detailed changes

build.gradle 🔗

@@ -91,6 +91,7 @@ dependencies {
     implementation 'com.otaliastudios:transcoder:0.9.1'
 
     implementation 'org.jxmpp:jxmpp-jid:1.0.3'
+    implementation 'org.jxmpp:jxmpp-stringprep-libidn:1.0.3'
     implementation 'org.osmdroid:osmdroid-android:6.1.11'
     implementation 'org.hsluv:hsluv:0.2'
     implementation 'org.conscrypt:conscrypt-android:2.5.2'

src/main/java/eu/siacs/conversations/services/XmppConnectionService.java 🔗

@@ -1244,6 +1244,7 @@ public class XmppConnectionService extends Service {
     @SuppressLint("TrulyRandom")
     @Override
     public void onCreate() {
+        org.jxmpp.stringprep.libidn.LibIdnXmppStringprep.setup();
         setTheme(ThemeHelper.find(this));
         ThemeHelper.applyCustomColors(this);
         if (Compatibility.runsTwentySix()) {