Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!3174
Issue
#171886
: Mail needs X-Originating-IP in headers to get spammers
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#171886
: Mail needs X-Originating-IP in headers to get spammers
issue/drupal-171886:171886-contact-ip
into
10.1.x
Overview
0
Commits
1
Pipelines
0
Changes
3
Open
Steve Mokris
requested to merge
issue/drupal-171886:171886-contact-ip
into
10.1.x
2 years ago
Overview
0
Commits
1
Pipelines
0
Changes
3
Expand
Closes
#171886
0
0
Merge request reports
Compare
10.1.x
version 1
fff4690b
2 years ago
10.1.x (HEAD)
and
latest version
latest version
d9962e2d
1 commit,
2 years ago
version 1
fff4690b
1 commit,
2 years ago
3 files
+
6
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
core/modules/contact/tests/src/Functional/ContactPersonalTest.php
+
1
−
0
Options
@@ -97,6 +97,7 @@ public function testSendPersonalContactMessage() {
$this
->
assertEquals
(
'user_mail'
,
$mail
[
'key'
]);
$subject
=
'['
.
$this
->
config
(
'system.site'
)
->
get
(
'name'
)
.
'] '
.
$message
[
'subject[0][value]'
];
$this
->
assertEquals
(
$subject
,
$mail
[
'subject'
],
'Subject is in sent message.'
);
$this
->
assertEquals
(
'[127.0.0.1]'
,
$mail
[
'headers'
][
'X-Originating-IP'
]);
$this
->
assertStringContainsString
(
'Hello '
.
$this
->
contactUser
->
getDisplayName
(),
$mail
[
'body'
],
'Recipient name is in sent message.'
);
$this
->
assertStringContainsString
(
$this
->
webUser
->
getDisplayName
(),
$mail
[
'body'
],
'Sender name is in sent message.'
);
$this
->
assertStringContainsString
(
$message
[
'message[0][value]'
],
$mail
[
'body'
],
'Message body is in sent message.'
);
Loading