Skip to content

Commit 3cf871e

Browse files
smowtonmchammer01
andauthored
Apply docs suggestions
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent e9df675 commit 3cf871e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

java/ql/src/Security/CWE/CWE-023/PartialPathTraversal.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
is to use <code>getCanonicalPath()</code> to remove any path-traversal elements and then check that <code>DIR</code>
88
is a prefix. However, if <code>DIR</code> is not slash-terminated, this can unexpectedly allow accessing siblings of <code>DIR</code>.</p>
99

10-
<p>See also <code>java/partial-path-traversal-from-remote</code>, which is similar to this query but only flags instances with evidence of remote exploitability</p>
10+
<p>See also <code>java/partial-path-traversal-from-remote</code>, which is similar to this query but only flags instances with evidence of remote exploitability.</p>
1111
</overview>
1212

1313
<include src="PartialPathTraversalRemainder.inc.qhelp"/>

java/ql/src/Security/CWE/CWE-023/PartialPathTraversal.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @name Partial Path Traversal Vulnerability
2+
* @name Partial path traversal vulnerability
33
* @description A prefix used to check that a canonicalised path falls within another must be slash-terminated.
44
* @kind problem
55
* @problem.severity error

java/ql/src/Security/CWE/CWE-023/PartialPathTraversalFromRemote.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ is to use <code>getCanonicalPath()</code> to remove any path-traversal elements
88
is a prefix. However, if <code>DIR</code> is not slash-terminated, this can unexpectedly allow accessing siblings of <code>DIR</code>.</p>
99

1010
<p>See also <code>java/partial-path-traversal</code>, which is similar to this query,
11-
but may also flag non-remotely-exploitable instances of Partial Path Traversal.</p>
11+
but may also flag non-remotely-exploitable instances of partial path traversal vulnerabilities.</p>
1212
</overview>
1313

1414
<include src="PartialPathTraversalRemainder.inc.qhelp"/>

java/ql/src/Security/CWE/CWE-023/PartialPathTraversalFromRemote.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @name Partial Path Traversal Vulnerability From Remote
2+
* @name Partial path traversal vulnerability from remote
33
* @description A prefix used to check that a canonicalised path falls within another must be slash-terminated.
44
* @kind path-problem
55
* @problem.severity error

java/ql/src/Security/CWE/CWE-023/PartialPathTraversalRemainder.inc.qhelp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ returns a <b>non</b>-slash-terminated path string, so a slash must be added to <
1717

1818
In this example, the <code>if</code> statement checks if <code>parent.getCanonicalPath()</code>
1919
is a prefix of <code>dir.getCanonicalPath()</code>. However, <code>parent.getCanonicalPath()</code> is
20-
not slash-terminated. So, the user that supplies <code>dir</code> may be allowed to access siblings of <code>parent</code>
20+
not slash-terminated. This means that users that supply <code>dir</code> may be also allowed to access siblings of <code>parent</code>
2121
and not just children of <code>parent</code>, which is a security issue.
2222

2323
</p>
@@ -40,9 +40,9 @@ indeed slash-terminated, the user supplying <code>dir</code> can only access chi
4040

4141
<li>
4242
OWASP:
43-
<a href="https://owasp.org/www-community/attacks/Path_Traversal">Partial Path Traversal</a>.
44-
CVE-2022-23457:
45-
<a href="https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/GHSL-2022-008_The_OWASP_Enterprise_Security_API.md"> ESAPI Vulnerability Report</a>
43+
<a href="https://owasp.org/www-community/attacks/Path_Traversal">Partial Path Traversal</a>.</li>
44+
<li>CVE-2022-23457:
45+
<a href="https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/GHSL-2022-008_The_OWASP_Enterprise_Security_API.md"> ESAPI Vulnerability Report</a>.</li>
4646
</li>
4747

4848
</references>

0 commit comments

Comments
 (0)