Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
652ee918
Commit
652ee918
authored
Apr 06, 2016
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1246228 - Email addresses must not be encoded
r/a=dkl
parent
aa5f64e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
MIME.pm
Bugzilla/MIME.pm
+3
-14
attachment.cgi
attachment.cgi
+1
-0
No files found.
Bugzilla/MIME.pm
View file @
652ee918
...
...
@@ -13,9 +13,6 @@ use warnings;
use
parent
qw(Email::MIME)
;
use
Encode
qw(encode)
;
use
Encode::MIME::
Header
;
sub
new
{
my
(
$class
,
$msg
)
=
@_
;
state
$use_utf8
=
Bugzilla
->
params
->
{
'utf8'
};
...
...
@@ -79,20 +76,12 @@ sub as_string {
# MIME-Version must be set otherwise some mailsystems ignore the charset
$self
->
header_set
(
'MIME-Version'
,
'1.0'
)
if
!
$self
->
header
(
'MIME-Version'
);
# Encode the headers correctly
in quoted-printable
# Encode the headers correctly
.
foreach
my
$header
(
$self
->
header_names
)
{
my
@values
=
$self
->
header
(
$header
);
# We don't recode headers that happen multiple times.
next
if
scalar
(
@values
)
>
1
;
if
(
my
$value
=
$values
[
0
])
{
utf8::
decode
(
$value
)
unless
$use_utf8
&&
utf8::
is_utf8
(
$value
);
# avoid excessive line wrapping done by Encode.
local
$
Encode::
Encoding
{
'MIME-Q'
}
->
{
'bpl'
}
=
998
;
map
{
utf8::
decode
(
$_
)
if
defined
(
$_
)
&&
!
utf8::
is_utf8
(
$_
)
}
@values
;
my
$encoded
=
encode
(
'MIME-Q'
,
$value
);
$self
->
header_set
(
$header
,
$encoded
);
}
$self
->
header_str_set
(
$header
,
@values
);
}
# Ensure the character-set and encoding is set correctly on single part
...
...
attachment.cgi
View file @
652ee918
...
...
@@ -26,6 +26,7 @@ use Bugzilla::Attachment::PatchReader;
use
Bugzilla::
Token
;
use
Encode
qw(encode find_encoding)
;
use
Encode::MIME::
Header
;
# Required to alter Encode::Encoding{'MIME-Q'}.
# For most scripts we don't make $cgi and $template global variables. But
# when preparing Bugzilla for mod_perl, this script used these
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment