Skip to content

Commit e53ed47

Browse files
committed
Python: Highlight os.path.join behavior with absolute paths
1 parent 4d9f24a commit e53ed47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/ql/src/Security/CWE-022/PathInjection.qhelp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ In the second example, it appears that the user is restricted to opening a file
4343
special characters. For example, the string <code>"../../../etc/passwd"</code> will result in the code
4444
reading the file located at <code>"/server/static/images/../../../etc/passwd"</code>, which is the system's
4545
password file. This file would then be sent back to the user, giving them access to all the
46-
system's passwords.
46+
system's passwords. Note that it is still possible to use an absolute path, since the result of
47+
<code>os.path.join("/server/static/images/", "/etc/passwd")</code> is <code>"/etc/passwd"</code>.
4748
</p>
4849

4950
<p>

0 commit comments

Comments
 (0)