GeezerVison is showing github.com — Apply suggestions from code review · github/codeql@143e168
File tree
Expand file treeCollapse file tree
Open diff view settings
java/ql/src/Security/CWE/CWE-022
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: java/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,12 +41,12 @@ such as "/etc/passwd".</p> |
41 | 41 | <sample src="TaintedPath.java" /> |
42 | 42 |
|
43 | 43 | <p>Simply checking that the path is under a trusted location (such as a known public folder) is not enough, |
44 | | -however, since the path could contain relative components such as "..". To fix this, we check that the it does |
| 44 | +however, since the path could contain relative components such as "..". To fix this, check that it does |
45 | 45 | not contain ".." and starts with the public folder.</p> |
46 | 46 |
|
47 | 47 | <sample src="TaintedPathGood.java" /> |
48 | 48 |
|
49 | | -<p>Alternatively, if we only want to allow simple filenames without a path component, we can remove all path |
| 49 | +<p>Alternatively, if you only want to allow simple filenames without a path component, you can remove all path |
50 | 50 | separators ("/" or "\") and all ".." sequences from the input before using it to construct a file path.</p> |
51 | 51 |
|
52 | 52 | <sample src="TaintedPathGood2.java" /> |
|