File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ruby/ql/src/queries/security/cwe-094 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ and methods.
8080A safer approach is to use <code >class_variable_set</code > and
8181<code >class_variable_get</code > along with <code >define_method</code >. String
8282interpolation is still used to construct the class variable name, but this is
83- safe because <code >class_variable_set<code > is not susceptible to code injection.
83+ safe because <code >class_variable_set</ code > is not susceptible to code injection.
8484To construct a dynamic method call we use <code >send</code >, which is ulnerable
8585to code injection: if an attacker can control the first argument, they can call
8686any method on the receiver. However this is less powerful than being able to run
@@ -101,10 +101,10 @@ OWASP:
101101Wikipedia: <a href =" https://en.wikipedia.org/wiki/Code_injection" >Code Injection</a >.
102102</li >
103103<li >
104- Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-define_method" >< code > define_method</ code > </a >.
104+ Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-define_method" >define_method</a >.
105105</li >
106106<li >
107- Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-class_variable_set" >< code > class_variable_set</ code > </a >.
107+ Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-class_variable_set" >class_variable_set</a >.
108108</li >
109109</references >
110110</qhelp >
You can’t perform that action at this time.
0 commit comments