From 47901e4198f869a71f2860c0b8f1ae1ec708af08 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 7 Aug 2017 12:40:40 -0700 Subject: [PATCH] Disallow alpha chars in country code field // FREEBIe --- src/org/thoughtcrime/securesms/RegistrationActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/RegistrationActivity.java b/src/org/thoughtcrime/securesms/RegistrationActivity.java index 974ae1b11c..b30bafeed2 100644 --- a/src/org/thoughtcrime/securesms/RegistrationActivity.java +++ b/src/org/thoughtcrime/securesms/RegistrationActivity.java @@ -298,7 +298,7 @@ public class RegistrationActivity extends BaseActionBarActivity { private class CountryCodeChangedListener implements TextWatcher { @Override public void afterTextChanged(Editable s) { - if (TextUtils.isEmpty(s)) { + if (TextUtils.isEmpty(s) || !TextUtils.isDigitsOnly(s)) { setCountryDisplay(getString(R.string.RegistrationActivity_select_your_country)); countryFormatter = null; return;