mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
rb/stored-xss structure and initial implementation (FileSystemReadAccess sources)
This commit is contained in:
1
ql/test/query-tests/security/cwe-079/StoredXSS.qlref
Normal file
1
ql/test/query-tests/security/cwe-079/StoredXSS.qlref
Normal file
@@ -0,0 +1 @@
|
||||
queries/security/cwe-079/StoredXSS.ql
|
||||
@@ -22,4 +22,10 @@ class BarsController < ApplicationController
|
||||
@html_escaped = ERB::Util.html_escape(params[:text])
|
||||
render "foo/bars/show", locals: { display_text: dt, safe_text: "hello" }
|
||||
end
|
||||
|
||||
def show_stored
|
||||
dt = File.read("foo.txt")
|
||||
@instance_text = dt
|
||||
render "foo/bars/show", locals: { display_text: dt, safe_text: "hello" }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user