Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443488
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
drupal-3443488
Commits
8ce1c80c
Commit
8ce1c80c
authored
14 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#829484
by Berdir, Dave Reid, dereine: uncaught PDO Exception - XSS.
parent
267ebfb7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
includes/errors.inc
+1
-1
1 addition, 1 deletion
includes/errors.inc
modules/simpletest/tests/system_test.module
+6
-0
6 additions, 0 deletions
modules/simpletest/tests/system_test.module
modules/system/system.test
+4
-0
4 additions, 0 deletions
modules/system/system.test
with
11 additions
and
1 deletion
includes/errors.inc
+
1
−
1
View file @
8ce1c80c
...
...
@@ -135,7 +135,7 @@ function _drupal_decode_exception($exception) {
* An error message.
*/
function
_drupal_render_exception_safe
(
$exception
)
{
return
strtr
(
'%type: %message in %function (line %line of %file).'
,
_drupal_decode_exception
(
$exception
));
return
check_plain
(
strtr
(
'%type: %message in %function (line %line of %file).'
,
_drupal_decode_exception
(
$exception
))
)
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
modules/simpletest/tests/system_test.module
+
6
−
0
View file @
8ce1c80c
...
...
@@ -303,5 +303,11 @@ function _system_test_second_shutdown_function($arg1, $arg2) {
// Output something, page has already been printed and the session stored
// so we can't use drupal_set_message.
print
t
(
'Second shutdown function, arg1 : @arg1, arg2: @arg2'
,
array
(
'@arg1'
=>
$arg1
,
'@arg2'
=>
$arg2
));
// Throw an exception with an HTML tag. Since this is called in a shutdown
// function, it will not bubble up to the default exception handler but will
// be catched in _drupal_shutdown_function() and be displayed through
// _drupal_render_exception_safe().
throw
new
Exception
(
'Drupal is <blink>awesome</blink>.'
);
}
This diff is collapsed.
Click to expand it.
modules/system/system.test
+
4
−
0
View file @
8ce1c80c
...
...
@@ -1818,6 +1818,10 @@ class ShutdownFunctionsTest extends DrupalWebTestCase {
$this
->
drupalGet
(
'system-test/shutdown-functions/'
.
$arg1
.
'/'
.
$arg2
);
$this
->
assertText
(
t
(
'First shutdown function, arg1 : @arg1, arg2: @arg2'
,
array
(
'@arg1'
=>
$arg1
,
'@arg2'
=>
$arg2
)));
$this
->
assertText
(
t
(
'Second shutdown function, arg1 : @arg1, arg2: @arg2'
,
array
(
'@arg1'
=>
$arg1
,
'@arg2'
=>
$arg2
)));
// Make sure exceptions displayed through _drupal_render_exception_safe()
// are correctly escaped.
$this
->
assertText
(
'Drupal is <blink>awesome</blink>.'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment