Skip to content

Commit 8b2009c

Browse files
committed
Minor updates to qhelp file
1 parent 390ee3a commit 8b2009c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.qhelp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<overview>
66
<p>
77
If an XPath expression is built using string concatenation, and the components of the concatenation
8-
include user input, a user is likely to be able to create a malicious XPath expression.
8+
include user input, it makes it very easy for a user to create a malicious XPath expression.
99
</p>
1010
</overview>
1111

1212
<recommendation>
1313
<p>
14-
If user input must be included in an XPath expression, pre-compile the query and use variable
15-
references to include the user input.
14+
If user input must be included in an XPath expression, either sanitize the data or pre-compile the query
15+
and use variable references to include the user input.
1616
</p>
1717
<p>
1818
XPath injection can also be prevented by using XQuery.
@@ -22,14 +22,14 @@ XPath injection can also be prevented by using XQuery.
2222

2323
<example>
2424
<p>
25-
In the first, second, and third example, the code accepts a name and password specified by the user, and uses this
25+
In the first three examples, the code accepts a name and password specified by the user, and uses this
2626
unvalidated and unsanitized value in an XPath expression. This is vulnerable to the user providing
2727
special characters or string sequences that change the meaning of the XPath expression to search
2828
for different values.
2929
</p>
3030

3131
<p>
32-
In the fourth example, the code utilizes setXPathVariableResolver which prevents XPath Injection.
32+
In the fourth example, the code uses `setXPathVariableResolver` which prevents XPath injection.
3333
</p>
3434
<p>
3535
The fifth example is a dom4j XPath injection example.
@@ -39,6 +39,6 @@ The fifth example is a dom4j XPath injection example.
3939

4040
<references>
4141
<li>OWASP: <a href="https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/07-Input_Validation_Testing/09-Testing_for_XPath_Injection">Testing for XPath Injection</a>.</li>
42-
<li>OWASP: <a href="https://www.owasp.org/index.php/XPATH_Injection">XPath Injection</a>.</li>
42+
<li>OWASP: <a href="https://owasp.org/www-community/attacks/XPATH_Injection">XPath Injection</a>.</li>
4343
</references>
4444
</qhelp>

0 commit comments

Comments
 (0)