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
0fb0a939
Commit
0fb0a939
authored
Dec 28, 2004
by
Dries
Browse files
- Improved the input checking.
parent
ddbec122
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
0fb0a939
...
...
@@ -584,7 +584,7 @@ function valid_input_data($data) {
}
}
}
else
{
else
if
(
isset
(
$data
))
{
// Detect dangerous input data.
// Decode all normal character entities.
...
...
@@ -1805,8 +1805,14 @@ function drupal_get_path($type, $name) {
// Initialize all enabled modules.
module_init
();
if
(
$_REQUEST
&&
!
user_access
(
'bypass input data check'
))
{
if
(
!
valid_input_data
(
$_REQUEST
))
{
if
(
!
user_access
(
'bypass input data check'
))
{
// We can't use $_REQUEST because it consists of the contents of $_POST,
// $_GET and $_COOKIE: if any of the input arrays share a key, only one
// value will be verified.
if
(
!
valid_input_data
(
$_GET
)
||
!
valid_input_data
(
$_POST
)
||
!
valid_input_data
(
$_COOKIE
)
||
!
valid_input_data
(
$_FILES
))
{
die
(
'Terminated request because of suspicious input data.'
);
}
}
...
...
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