File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
java/ql/src/Security/CWE/CWE-022 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,12 @@ such as "/etc/passwd".</p>
4141<sample src =" TaintedPath.java" />
4242
4343<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
4545not contain ".." and starts with the public folder.</p >
4646
4747<sample src =" TaintedPathGood.java" />
4848
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
5050separators ("/" or "\") and all ".." sequences from the input before using it to construct a file path.</p >
5151
5252<sample src =" TaintedPathGood2.java" />
You can’t perform that action at this time.
0 commit comments