From a8e8732979904a365aeb5bd2dad001de30baad70 Mon Sep 17 00:00:00 2001 From: Vavassor Date: Tue, 30 May 2017 16:57:30 -0400 Subject: [PATCH] Fixes a validation error on login when instance names are entered with multiple @ symbols like @username@example.com. --- app/src/main/java/com/keylesspalace/tusky/LoginActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/LoginActivity.java b/app/src/main/java/com/keylesspalace/tusky/LoginActivity.java index 9226dc6c..52e653f8 100644 --- a/app/src/main/java/com/keylesspalace/tusky/LoginActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/LoginActivity.java @@ -137,7 +137,7 @@ public class LoginActivity extends AppCompatActivity { s = s.replaceFirst("http://", ""); s = s.replaceFirst("https://", ""); // If a username was included (e.g. username@example.com), just take what's after the '@'. - int at = s.indexOf('@'); + int at = s.lastIndexOf('@'); if (at != -1) { s = s.substring(at + 1); }