mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
Apply style suggestions
This commit is contained in:
@@ -15,16 +15,16 @@ If user input must be included in an XPath expression, pre-compile the query and
|
||||
references to include the user input.
|
||||
</p>
|
||||
<p>
|
||||
For example, when using the <code>github.com/ChrisTrenkamp/goxpath</code> API, this can be done by creating a function that takes an <code>*goxpath.Opts</code> structure.
|
||||
For example, when using the <code>github.com/ChrisTrenkamp/goxpath</code> API, you can do this by creating a function that takes an <code>*goxpath.Opts</code> structure.
|
||||
In this structure you can then set the values of the variable references.
|
||||
This function can then be specified when calling <code>Exec()</code>, <code>Exec{Bool|Num|Node}()</code>, <code>ParseExec()</code> or <code>MustExec()</code>.
|
||||
This function can then be specified when calling <code>Exec()</code>, <code>Exec{Bool|Num|Node}()</code>, <code>ParseExec()</code>, or <code>MustExec()</code>.
|
||||
</p>
|
||||
|
||||
</recommendation>
|
||||
|
||||
<example>
|
||||
<p>
|
||||
In the first example, the code accepts a user name specified by the user, and uses this
|
||||
In the first example, the code accepts a username specified by the user, and uses this
|
||||
unvalidated and unsanitized value in an XPath expression. This is vulnerable to the user providing
|
||||
special characters or string sequences that change the meaning of the XPath expression to search
|
||||
for different values.
|
||||
|
||||
Reference in New Issue
Block a user