ShadowNinja 0f0502109e Security: Fix resolving of some relative paths
Trying to resolve a path with RemoveRelativePathComponents that can't
be resolved without leaving leading parent components (e.g. "../worlds/foo"
or "bar/../../worlds/foo") will fail.  To work around this, we leave
the relative components and simply remove the trailing components one
at a time, and bail out when we find a parent component.  This will
still fail for paths like "worlds/foo/noexist/../auth.txt" (the path
before the last parent component must not exist), but this is fine
since you won't be able to open a file with a path like that anyways
(the O.S. will determine that the path doesn't exist.
Try `cat /a/../etc/passwd`).
2016-12-20 17:17:38 +10:00
..
2015-05-16 18:32:31 -04:00
2016-01-23 05:45:29 +01:00
2016-10-16 01:13:16 +01:00
2016-03-07 19:54:26 +01:00
2016-01-23 05:45:29 +01:00
2015-07-23 07:38:13 +02:00
2016-08-26 05:26:08 +01:00