Support matching to account for telcos inserting SMS prefixes.

// FREEBIE

Fixes #1944
This commit is contained in:
Moxie Marlinspike 2015-02-16 18:09:14 -08:00
parent f818cfa32b
commit 299dd86c77

View File

@ -128,7 +128,7 @@ public class SmsListener extends BroadcastReceiver {
if (messageBody == null)
return false;
if (messageBody.matches("Your TextSecure verification code: [0-9]{3,4}-[0-9]{3,4}") &&
if (messageBody.matches(".*Your TextSecure verification code: [0-9]{3,4}-[0-9]{3,4}") &&
TextSecurePreferences.isVerifying(context))
{
return true;