Relative Content

Tag Archive for javafilefilesystems

Is there a way to prevent the “..” folder in Java?

I am making a program which allows the user to control a certain folder and I ran into a security issue which allows the user to read files “../YouShouldNotBeAbleToReadThisFile.txt” and I was wondering if there is a way to block this behavior without manually running filenames through a filter to avoid a slip-up.