Skip to content

Commit cc3cc1f

Browse files
committed
Merge branch 'ruby-UBV' of https://github.com/sim4n6/codeql-pun into ruby-UBV
2 parents d11cb91 + e345d7d commit cc3cc1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruby/ql/src/experimental/cwe-176/examples/unicode_normalization.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class UnicodeNormalizationHtMLSafeController < ActionController::Base
22
def unicodeNormalize
33
unicode_input = params[:unicode_input]
4-
unicode_html_safe = unicode_input.html_safe
4+
unicode_html_safe = CGI.escapeHTML(unicode_input).html_safe
55
normalized_nfkc = unicode_html_safe.unicode_normalize(:nfkc) # $result=BAD
66
normalized_nfc = unicode_html_safe.unicode_normalize(:nfc) # $result=BAD
77
end

0 commit comments

Comments
 (0)