Skip to content
Snippets Groups Projects
Commit 6c705bd3 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix decoding of piped email attach file names

parent 37b8d549
Branches
Tags
No related merge requests found
...@@ -365,7 +365,7 @@ class Mail_Parse { ...@@ -365,7 +365,7 @@ class Mail_Parse {
|| !strcasecmp($part->ctype_primary,'application')))) { || !strcasecmp($part->ctype_primary,'application')))) {
if (isset($part->d_parameters['filename'])) if (isset($part->d_parameters['filename']))
$filename = $part->d_parameters['filename']; $filename = Format::mimedecode($part->d_parameters['filename'], $this->charset);
elseif (isset($part->d_parameters['filename*'])) elseif (isset($part->d_parameters['filename*']))
// Support RFC 6266, section 4.3 and RFC, and RFC 5987 // Support RFC 6266, section 4.3 and RFC, and RFC 5987
$filename = Format::decodeRfc5987( $filename = Format::decodeRfc5987(
...@@ -374,7 +374,7 @@ class Mail_Parse { ...@@ -374,7 +374,7 @@ class Mail_Parse {
// Support attachments that do not specify a content-disposition // Support attachments that do not specify a content-disposition
// but do specify a "name" parameter in the content-type header. // but do specify a "name" parameter in the content-type header.
elseif (isset($part->ctype_parameters['name'])) elseif (isset($part->ctype_parameters['name']))
$filename = $part->ctype_parameters['name']; $filename = Format::mimedecode($part->ctype_parameters['name'], $this->charset);
elseif (isset($part->ctype_parameters['name*'])) elseif (isset($part->ctype_parameters['name*']))
$filename = Format::decodeRfc5987( $filename = Format::decodeRfc5987(
$part->ctype_parameters['name*']); $part->ctype_parameters['name*']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment