diff options
author | Sam Whited <sam@samwhited.com> | 2014-12-23 17:35:36 -0500 |
---|---|---|
committer | Sam Whited <sam@samwhited.com> | 2014-12-23 17:35:36 -0500 |
commit | afbe727b17b1e1d1a994b003f28ab7562bb655b4 (patch) | |
tree | a5527bfa94cc66acfbb4a2b8db9475094cbf0ef3 | |
parent | 8a467e33dd7212fc3926b6fed2ae64fcb57e7f60 (diff) |
Don't allow user to register domain only jids
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index e9c11d88..9597b15e 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -82,6 +82,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate mAccountJid.requestFocus(); return; } + if (jid.isDomainJid()) { + mAccountJid.setError(getString(R.string.invalid_jid)); + mAccountJid.requestFocus(); + return; + } final String password = mPassword.getText().toString(); final String passwordConfirm = mPasswordConfirm.getText().toString(); if (registerNewAccount) { |