diff options
| author | babenko <[email protected]> | 2026-04-20 19:19:07 +0300 |
|---|---|---|
| committer | babenko <[email protected]> | 2026-04-20 22:58:55 +0300 |
| commit | c1affcfad650dccbdb804889132e7104b60633a7 (patch) | |
| tree | 545114b8b08210f671e9070495a797103f4b3086 /contrib/tools/python3/Python/frozen_modules/getpath.h | |
| parent | add1c721a4dda89c4532a75ff4fb9d6396fa4ab7 (diff) | |
Fix IsPathRelativeAndInvolvesNoTraversal treating "." component as directory entry
The check `normalizedPath == "."` compared the entire input path against "."
instead of the current path component `part`. This caused any "." component
in the middle of a path to increment the depth counter rather than be a no-op,
allowing subsequent ".." components to escape the root undetected.
For example, "./.." was incorrectly accepted: "." bumped depth to 1, then ".."
decremented it back to 0, and the function returned true instead of false.
Added a regression test covering this case.
commit_hash:6d034e6e0a26f960ccdee3f7a362916369b0f4b9
Diffstat (limited to 'contrib/tools/python3/Python/frozen_modules/getpath.h')
0 files changed, 0 insertions, 0 deletions
