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
Commits
b4332a51
Commit
b4332a51
authored
2 weeks ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3521327
by avpaderno: The insecure examples code does not include delimiters for strings
parent
cb9453f1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/lib/Drupal/Component/Render/FormattableMarkup.php
+4
-4
4 additions, 4 deletions
core/lib/Drupal/Component/Render/FormattableMarkup.php
with
4 additions
and
4 deletions
core/lib/Drupal/Component/Render/FormattableMarkup.php
+
4
−
4
View file @
b4332a51
...
...
@@ -124,10 +124,10 @@ public function jsonSerialize(): string {
* Insecure examples.
* @code
* // The following are using the @ placeholder inside an HTML tag.
* $this->placeholderFormat('<@foo>text</@foo>, ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>, ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>, ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>, ['@foo' => $some_variable]);
* $this->placeholderFormat('<@foo>text</@foo>
'
, ['@foo' => $some_variable]);
* $this->placeholderFormat('<a @foo>link text</a>
'
, ['@foo' => $some_variable]);
* $this->placeholderFormat('<a href="@foo">link text</a>
'
, ['@foo' => $some_variable]);
* $this->placeholderFormat('<a title="@foo">link text</a>
'
, ['@foo' => $some_variable]);
* // Implicitly convert an object to a string, which is not sanitized.
* $this->placeholderFormat('Non-sanitized replacement value: @foo', ['@foo' => $safe_string_interface_object]);
* @endcode
...
...
This diff is collapsed.
Click to expand it.
catch
@catch
mentioned in commit
d4c9cbd2
·
2 weeks ago
mentioned in commit
d4c9cbd2
mentioned in commit d4c9cbd20de71db8a4faf84e26ed5394279b596a
Toggle commit list
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