Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
a7790462
Commit
a7790462
authored
5 years ago
by
Seamus Lee
Browse files
Options
Downloads
Patches
Plain Diff
Fix Regression in Email Processor filing all emails as .unknown attachments
parent
273b3410
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
+17
-0
17 additions, 0 deletions
...r/patches/civicrm-custom-patches-zetacompoents-mail.patch
with
17 additions
and
0 deletions
tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
+
17
−
0
View file @
a7790462
...
...
@@ -23,3 +23,20 @@ index 3acadc3..06f1e71 100644
/**
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @version //autogentag//
diff --git a/src/parser/interfaces/part_parser.php b/src/parser/interfaces/part_parser.php
index a81378b..6c59e5a 100644
--- a/src/parser/interfaces/part_parser.php
+++ b/src/parser/interfaces/part_parser.php
@@ -168,7 +168,11 @@
abstract class ezcMailPartParser
break;
case 'text':
- if ( ezcMailPartParser::$parseTextAttachmentsAsFiles === true )
+ // dev/core#940 Ensure that emails are not processed as .unknown attachments by checking
+ // for Filename or name in the content-disposition and content-type headers.
+ if ( (ezcMailPartParser::$parseTextAttachmentsAsFiles === true) &&
+ (preg_match('/\s*filename="?([^;"]*);?/i', $headers['Content-Disposition']) ||
+ preg_match( '/\s*name="?([^;"]*);?/i' , $headers['Content-Type']) ) )
{
$bodyParser = new ezcMailFileParser( $mainType, $subType, $headers );
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment