diff --git a/build.gradle b/build.gradle index c240aee63..c6c338c62 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:7.2.1' } } diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java index 93bcddb9e..7a63a7ab0 100644 --- a/src/main/java/eu/siacs/conversations/Config.java +++ b/src/main/java/eu/siacs/conversations/Config.java @@ -57,7 +57,7 @@ public final class Config { public static final String LOGTAG = BuildConfig.LOGTAG; public static final Jid BUG_REPORTS = Jid.of("support@monocles.de"); - public static final Uri HELP = Uri.parse("https://monocles.de/howto"); + public static final Uri HELP = Uri.parse("https://monocles.wiki"); public static final String inviteUserURL = "https://" + monocles() + "/i/"; public static final String inviteMUCURL = "https://" + monocles() + "/j/"; diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java index 582ed54dd..c7eac9d2e 100644 --- a/src/main/java/eu/siacs/conversations/entities/Account.java +++ b/src/main/java/eu/siacs/conversations/entities/Account.java @@ -665,6 +665,7 @@ public class Account extends AbstractEntity implements AvatarService.Avatarable ONLINE(false), NO_INTERNET(false), UNAUTHORIZED, + TEMPORARY_AUTH_FAILURE, SERVER_NOT_FOUND, REGISTRATION_SUCCESSFUL(false), REGISTRATION_FAILED(true, false), diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 41f9093f0..1f85e36ef 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -53,6 +53,7 @@ import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.X509KeyManager; import javax.net.ssl.X509TrustManager; +import com.google.common.base.Strings; import eu.siacs.conversations.BuildConfig; import eu.siacs.conversations.Config; import eu.siacs.conversations.R; @@ -519,20 +520,25 @@ public class XmppConnection implements Runnable { } else if (nextTag.isStart("failure")) { final Element failure = tagReader.readElement(nextTag); if (Namespace.SASL.equals(failure.getNamespace())) { - final String text = failure.findChildContent("text"); - if (failure.hasChild("account-disabled") && text != null) { - Matcher matcher = Patterns.AUTOLINK_WEB_URL.matcher(text); + if (failure.hasChild("temporary-auth-failure")) { + throw new StateChangingException(Account.State.TEMPORARY_AUTH_FAILURE); + } else if (failure.hasChild("account-disabled")) { + final String text = failure.findChildContent("text"); + if ( Strings.isNullOrEmpty(text)) { + throw new StateChangingException(Account.State.UNAUTHORIZED); + } + final Matcher matcher = Patterns.AUTOLINK_WEB_URL.matcher(text); if (matcher.find()) { final HttpUrl url; try { url = HttpUrl.get(text.substring(matcher.start(), matcher.end())); - if (url.isHttps()) { - this.redirectionUrl = url; - throw new StateChangingException(Account.State.PAYMENT_REQUIRED); - } - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { throw new StateChangingException(Account.State.UNAUTHORIZED); } + if (url.isHttps()) { + this.redirectionUrl = url; + throw new StateChangingException(Account.State.PAYMENT_REQUIRED); + } } } throw new StateChangingException(Account.State.UNAUTHORIZED); diff --git a/src/main/res/values-de-rDE/strings.xml b/src/main/res/values-de-rDE/strings.xml index 4ceba73d8..bcc48f3bd 100644 --- a/src/main/res/values-de-rDE/strings.xml +++ b/src/main/res/values-de-rDE/strings.xml @@ -1176,4 +1176,6 @@ Orbot nicht gefunden Teilnehmer Download fehlgeschlagen: Ungültige Datei + Temporärer Authentifizierungsfehler + diff --git a/src/main/res/values/defaults.xml b/src/main/res/values/defaults.xml index b68ad7ff7..0db4e707a 100644 --- a/src/main/res/values/defaults.xml +++ b/src/main/res/values/defaults.xml @@ -119,7 +119,7 @@ - https://monocles.de/howto/ + https://monocles.wiki https://www.jabber.de/support/ https://dismail.de/contact.html https://www.draugr.de/kontakt/ diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 159240d33..793fde1e9 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -1203,4 +1203,5 @@ Participants Download failed: Invalid file Orbot not found + Temporary authentication failure