mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 13:24:52 +02:00
OAuth: check email before back slash
This commit is contained in:
@@ -234,6 +234,11 @@ public class FragmentOAuth extends FragmentBase {
|
||||
|
||||
if (TextUtils.isEmpty(email))
|
||||
throw new IllegalArgumentException(getString(R.string.title_no_email));
|
||||
|
||||
int backslash = email.indexOf('\\');
|
||||
if (backslash > 0)
|
||||
email = email.substring(0, backslash);
|
||||
|
||||
if (!Helper.EMAIL_ADDRESS.matcher(email).matches())
|
||||
throw new IllegalArgumentException(getString(R.string.title_email_invalid, email));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user