mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Prevent unregistered clients from repeatedly attempting an auth WebSockect connection.
This commit is contained in:
committed by
Alex Hart
parent
49f764a392
commit
5a0def7390
@@ -390,14 +390,12 @@ public class TextSecurePreferences {
|
||||
|
||||
if (previous != value) {
|
||||
Recipient.self().live().refresh();
|
||||
|
||||
if (value) {
|
||||
notifyUnregisteredReceived(context);
|
||||
clearLocalCredentials(context);
|
||||
}
|
||||
}
|
||||
|
||||
if (value) {
|
||||
clearLocalCredentials(context);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isUnauthorizedReceived(Context context) {
|
||||
@@ -895,7 +893,6 @@ public class TextSecurePreferences {
|
||||
}
|
||||
|
||||
private static void clearLocalCredentials(Context context) {
|
||||
|
||||
ProfileKey newProfileKey = ProfileKeyUtil.createNew();
|
||||
Recipient self = Recipient.self();
|
||||
SignalDatabase.recipients().setProfileKey(self.getId(), newProfileKey);
|
||||
|
||||
Reference in New Issue
Block a user