mirror of
https://github.com/github/codeql.git
synced 2026-02-24 02:43:40 +01:00
Apply suggestions from doc review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
210e71cd93
commit
45e2b94eb5
@@ -6,7 +6,7 @@
|
||||
<overview>
|
||||
<p>
|
||||
Using string concatenation to construct JavaScript code can be error-prone, or in the worst
|
||||
case enable code-injection if an input is constructed by an attacker.
|
||||
case, enable code injection if an input is constructed by an attacker.
|
||||
</p>
|
||||
</overview>
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
|
||||
<example>
|
||||
<p>
|
||||
The below example constructs a function that assigns the number 42 to the property <code>key</code>
|
||||
The example below constructs a function that assigns the number 42 to the property <code>key</code>
|
||||
on an object <code>obj</code>. However, if <code>key</code> contains <code></script></code>, then
|
||||
the generated code will break out of a <code><script></code> if the generated code is inserted
|
||||
into a <code><script></code> tag.
|
||||
</p>
|
||||
<sample src="examples/ImproperCodeSanitization.js" />
|
||||
<p>
|
||||
The issue has been fixed in the below by escaping potentially dangerous characters.
|
||||
The issue has been fixed by escaping potentially dangerous characters, as shown below.
|
||||
</p>
|
||||
<sample src="examples/ImproperCodeSanitizationFixed.js" />
|
||||
</example>
|
||||
|
||||
Reference in New Issue
Block a user