[automerger] Filter Attachment file name of forward slashes for .eml attachments. am: 53b40fd185 am: eb8ae2ec17 am: be56f65931 am: 6f463bac17 am: 015cde5a2b am: 1827d56264 am: 31ea2c26ff am: 3cb03481aa am: f16fc49b6a am: 4c2fb949c1 am: c59403a72e

Change-Id: Ib830bc94450ac3c1c89c73036614dcb9a4aa22f2
diff --git a/src/com/android/mail/providers/Attachment.java b/src/com/android/mail/providers/Attachment.java
index 4ed33f8..7f56d1d 100644
--- a/src/com/android/mail/providers/Attachment.java
+++ b/src/com/android/mail/providers/Attachment.java
@@ -256,6 +256,11 @@
                 name = MimeUtility.getHeaderParameter(contentDisposition, "filename");
             }
 
+            // Prevent passing in a file path as part of the name.
+            if (name != null) {
+                name = name.replace('/', '_');
+            }
+
             contentType = MimeType.inferMimeType(name, part.getMimeType());
             uri = EmlAttachmentProvider.getAttachmentUri(emlFileUri, messageId, cid);
             contentUri = uri;