Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4958c19

Browse files
committed
move the examples for the qhelps into an example/ folder
1 parent 6b66f5c commit 4958c19

6 files changed

Lines changed: 4 additions & 4 deletions

File tree

java/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ the user input matches one of these patterns.</p>
3838
and send it back over the socket. However, a malicious user could enter a file name anywhere on the file system,
3939
such as "/etc/passwd".</p>
4040

41-
<sample src="TaintedPath.java" />
41+
<sample src="examples/TaintedPath.java" />
4242

4343
<p>Simply checking that the path is under a trusted location (such as a known public folder) is not enough,
4444
however, since the path could contain relative components such as "..". To fix this, check that it does
4545
not contain ".." and starts with the public folder.</p>
4646

47-
<sample src="TaintedPathGood.java" />
47+
<sample src="examples/TaintedPathGood.java" />
4848

4949
</example>
5050
<references>

java/ql/src/Security/CWE/CWE-022/ZipSlip.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ the result is within the destination directory. If provided with a zip file cont
4545
path like <code>..\sneaky-file</code>, then this file would be written outside the destination
4646
directory.</p>
4747

48-
<sample src="ZipSlipBad.java" />
48+
<sample src="examples/ZipSlipBad.java" />
4949

5050
<p>To fix this vulnerability, we need to verify that the normalized <code>file</code> still has
5151
<code>destinationDir</code> as its prefix, and throw an exception if this is not the case.</p>
5252

53-
<sample src="ZipSlipGood.java" />
53+
<sample src="examples/ZipSlipGood.java" />
5454

5555
</example>
5656
<references>

java/ql/src/Security/CWE/CWE-022/TaintedPath.java renamed to java/ql/src/Security/CWE/CWE-022/examples/TaintedPath.java

File renamed without changes.

java/ql/src/Security/CWE/CWE-022/TaintedPathGood.java renamed to java/ql/src/Security/CWE/CWE-022/examples/TaintedPathGood.java

File renamed without changes.
File renamed without changes.

java/ql/src/Security/CWE/CWE-022/ZipSlipGood.java renamed to java/ql/src/Security/CWE/CWE-022/examples/ZipSlipGood.java

File renamed without changes.

0 commit comments

Comments
 (0)