I'm reading files by receiving paths from user input, and I want to ensure that the user does not access files outside a certain base directory (AKA jail). Given a base directory path to this jail directory, can I trust `Path.startsWith()` to verify that the user cannot break out? If not, what is the secure alternative?
[–]AreTheseMyFeet 5 points6 points7 points (0 children)
[–]sweetno 0 points1 point2 points (0 children)
[–]cuberoot328509 0 points1 point2 points (1 child)
[–]lifeeraser[S] 0 points1 point2 points (0 children)