mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-19 20:21:45 -05:00
Validate "original message" field of identity header when loading drafts
This commit is contained in:
parent
a1caebdcf1
commit
4e21f049d3
@ -2384,7 +2384,15 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
if (k9identity.containsKey(IdentityField.ORIGINAL_MESSAGE)) {
|
if (k9identity.containsKey(IdentityField.ORIGINAL_MESSAGE)) {
|
||||||
mMessageReference = null;
|
mMessageReference = null;
|
||||||
try {
|
try {
|
||||||
mMessageReference = new MessageReference(k9identity.get(IdentityField.ORIGINAL_MESSAGE));
|
String originalMessage = k9identity.get(IdentityField.ORIGINAL_MESSAGE);
|
||||||
|
MessageReference messageReference = new MessageReference(originalMessage);
|
||||||
|
|
||||||
|
// Check if this is a valid account in our database
|
||||||
|
Preferences prefs = Preferences.getPreferences(getApplicationContext());
|
||||||
|
Account account = prefs.getAccount(messageReference.accountUuid);
|
||||||
|
if (account != null) {
|
||||||
|
mMessageReference = messageReference;
|
||||||
|
}
|
||||||
} catch (MessagingException e) {
|
} catch (MessagingException e) {
|
||||||
Log.e(K9.LOG_TAG, "Could not decode message reference in identity.", e);
|
Log.e(K9.LOG_TAG, "Could not decode message reference in identity.", e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user