rb/stored-xss structure and initial implementation (FileSystemReadAccess sources)

This commit is contained in:
Alex Ford
2021-09-25 19:06:21 +01:00
parent 1c08592637
commit a2084f813e
7 changed files with 165 additions and 16 deletions

View File

@@ -0,0 +1 @@
queries/security/cwe-079/StoredXSS.ql

View File

@@ -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