Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
6b9f59512bbc
Commit
2e92600b
authored
Oct 01, 2015
by
Stan Hu
Browse files
Fix Message-ID field to be RFC 2111-compliant to prevent e-mails from being dropped
Closes #2867
parent
f495f97d82f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
6b9f5951
Please view this file on the master branch, on stable branches it's out of date.
v 8.1.0 (unreleased)
- Fix Message-ID header to be RFC 2111-compliant to prevent e-mails being dropped (Stan Hu)
- Add user preference to view activities as default dashboard (Stan Hu)
- Add option to admin area to sign in as a specific user (Pavel Forkert)
- Show CI status on all pages where commits list is rendered
...
...
app/mailers/notify.rb
View file @
6b9f5951
...
...
@@ -140,7 +140,7 @@ def mail_new_thread(model, headers = {})
# * have a 'In-Reply-To' or 'References' header that references the original 'Message-ID'
#
def
mail_answer_thread
(
model
,
headers
=
{})
headers
[
'Message-ID'
]
=
SecureRandom
.
hex
headers
[
'Message-ID'
]
=
"<
#{
SecureRandom
.
hex
}
@
#{
Gitlab
.
config
.
gitlab
.
host
}
>"
headers
[
'In-Reply-To'
]
=
message_id
(
model
)
headers
[
'References'
]
=
message_id
(
model
)
...
...
spec/mailers/notify_spec.rb
View file @
6b9f5951
...
...
@@ -52,6 +52,7 @@
end
it
'has headers that reference an existing thread'
do
is_expected
.
to
have_header
'Message-ID'
,
/<(.*)@
#{
Gitlab
.
config
.
gitlab
.
host
}
>/
is_expected
.
to
have_header
'References'
,
/<
#{
thread_id_prefix
}
(.*)@
#{
Gitlab
.
config
.
gitlab
.
host
}
>/
is_expected
.
to
have_header
'In-Reply-To'
,
/<
#{
thread_id_prefix
}
(.*)@
#{
Gitlab
.
config
.
gitlab
.
host
}
>/
is_expected
.
to
have_header
'X-GitLab-Project'
,
/
#{
project
.
name
}
/
...
...
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