mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Added one more example to the qhelp
This commit is contained in:
@@ -23,6 +23,18 @@
|
||||
|
||||
<sample src="./examples/unicode_normalization.rb" />
|
||||
|
||||
</example>
|
||||
<example>
|
||||
|
||||
<p> The next example shows how an early deletion of a character may be bypassed due to a
|
||||
potential Unicode character collision.</p>
|
||||
<p>The character <code><</code> was expected to be omitted from the string <code>s</code>.
|
||||
However, a malicious user may consider using its colliding Unicode character U+FE64 <code>
|
||||
﹤</code> as an alternative. Due to the Late-Unicode normalization with the form NFKC,
|
||||
the resulting string would contain the unintended character <code><</code> . </p>
|
||||
|
||||
<sample src="./examples/unicode_normalization2.rb" />
|
||||
|
||||
</example>
|
||||
<references>
|
||||
<li> Research study: <a
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
s = "﹤xss>"
|
||||
puts s.delete("<").unicode_normalize(:nfkc).include?("<")
|
||||
Reference in New Issue
Block a user