Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
eedb392c
Commit
eedb392c
authored
Sep 19, 2005
by
Dries
Browse files
- Patch
#28420
by Jeremy: add the poster's IP/hostname to the /mix/.
parent
2b3126b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
eedb392c
...
...
@@ -1057,7 +1057,7 @@ function form_token($key) {
}
// the verification token is an md5 hash of the form key and our private key
return
form_hidden
(
'form_token'
,
md5
(
$key
.
variable_get
(
'drupal_private_key'
,
''
)));
return
form_hidden
(
'form_token'
,
md5
(
$_SERVER
[
'REMOTE_ADDR'
]
.
$key
.
variable_get
(
'drupal_private_key'
,
''
)));
}
/**
...
...
@@ -1080,7 +1080,7 @@ function form_validate($edit, $key, $error_message = NULL) {
$error
=
t
(
'Validation error, please try again. If this error persists, please contact the site administrator.'
);
}
if
(
$edit
[
'form_token'
]
!=
md5
(
$key
.
variable_get
(
'drupal_private_key'
,
''
)))
{
if
(
$edit
[
'form_token'
]
!=
md5
(
$_SERVER
[
'REMOTE_ADDR'
]
.
$key
.
variable_get
(
'drupal_private_key'
,
''
)))
{
// setting this error will cause the form to fail validation
form_set_error
(
'form_token'
,
$error
);
}
...
...
Write
Preview
Supports
Markdown
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