mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Check reply to and bcc address
This commit is contained in:
@@ -595,7 +595,7 @@ public class FragmentIdentity extends FragmentBase {
|
||||
if (!should && TextUtils.isEmpty(email))
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_email));
|
||||
if (!should && !Patterns.EMAIL_ADDRESS.matcher(email).matches())
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid));
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid, email));
|
||||
if (!should && TextUtils.isEmpty(host))
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
|
||||
if (TextUtils.isEmpty(port))
|
||||
@@ -605,6 +605,11 @@ public class FragmentIdentity extends FragmentBase {
|
||||
if (!should && synchronize && TextUtils.isEmpty(password) && !insecure)
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_password));
|
||||
|
||||
if (!should && !TextUtils.isEmpty(replyto) && !Patterns.EMAIL_ADDRESS.matcher(replyto).matches())
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid, replyto));
|
||||
if (!should && !TextUtils.isEmpty(bcc) && !Patterns.EMAIL_ADDRESS.matcher(bcc).matches())
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid, bcc));
|
||||
|
||||
if (TextUtils.isEmpty(display))
|
||||
display = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user