Fix path traversal vulnerability - #517
Conversation
|
Seems excessive. Previously we just banned any use of "/..". If the problem is Windows, a tiny tweak to that would be enough. |
In the previous implementation, paths containing "/.." were rejected, but in this implementation we ensure the path is normalised and resolved before the traversal check. i.e. the ".." and "." are both supported for all platforms. Although it seems a little heavier than before, it is only because |
|
I think supporting |
…s using both forward and backward slashes
|
Why not just ban URL paths with |
garethsb
left a comment
There was a problem hiding this comment.
LGTM - "the simplest thing that could possibly work"
Recommend squashing the commits before or while doing the merge.
A path traversal vulnerability has been identified in the Registry Admin UI in Windows. The vulnerability exists in
make_filesystem_route, where the code sanitises user-controlled file paths by checking for forward-slash parent directory sequences (/..) but completely ignores the backslash variant (..), which is a valid path separator on Windows systems.How the fix works:
Examples: