Use libidn for stringprep

Which actually validates according to spec instead of just being lazy.
This commit is contained in:
Stephen Paul Weber 2023-06-27 16:30:44 +02:00 committed by Daniel Gultsch
parent e3a121121b
commit 4c38c480fa
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 3 additions and 4 deletions

View file

@ -67,6 +67,7 @@ dependencies {
implementation 'com.github.natario1:Egloo:v0.4.0'
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'

View file

@ -33,7 +33,6 @@ import android.os.Bundle;
import android.os.Environment;
import android.os.IBinder;
import android.os.Messenger;
import android.os.Parcelable;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.SystemClock;
@ -60,6 +59,7 @@ import com.google.common.base.Optional;
import com.google.common.base.Strings;
import org.conscrypt.Conscrypt;
import org.jxmpp.stringprep.libidn.LibIdnXmppStringprep;
import org.openintents.openpgp.IOpenPgpService2;
import org.openintents.openpgp.util.OpenPgpApi;
import org.openintents.openpgp.util.OpenPgpServiceConnection;
@ -68,7 +68,6 @@ import java.io.File;
import java.security.Security;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -81,7 +80,6 @@ import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.Callable;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
@ -131,7 +129,6 @@ import eu.siacs.conversations.ui.UiCallback;
import eu.siacs.conversations.ui.interfaces.OnAvatarPublication;
import eu.siacs.conversations.ui.interfaces.OnMediaLoaded;
import eu.siacs.conversations.ui.interfaces.OnSearchResultsAvailable;
import eu.siacs.conversations.utils.AccountUtils;
import eu.siacs.conversations.utils.Compatibility;
import eu.siacs.conversations.utils.ConversationsFileObserver;
import eu.siacs.conversations.utils.CryptoHelper;
@ -1157,6 +1154,7 @@ public class XmppConnectionService extends Service {
@SuppressLint("TrulyRandom")
@Override
public void onCreate() {
LibIdnXmppStringprep.setup();
if (Compatibility.runsTwentySix()) {
mNotificationService.initializeChannels();
}