strip slashes from instance domain to avoid crash

This commit is contained in:
Conny Duck 2018-04-17 20:51:33 +02:00
parent 4bdcc9667e
commit 145c6a8acb
1 changed files with 4 additions and 0 deletions

View File

@ -320,6 +320,10 @@ class LoginActivity : AppCompatActivity() {
// Strip any schemes out.
var s = domain.replaceFirst("http://", "")
s = s.replaceFirst("https://", "")
//strip out any slashes that might have been added
s = s.replace("/", "")
// If a username was included (e.g. username@example.com), just take what's after the '@'.
val at = s.lastIndexOf('@')
if (at != -1) {