suppose I have the following code that will display an image. The name of the image is supplied by the user as follows:
My image.php file contains
$image = $_GET['image'];
$file = file_get_contents('http://example.com/images/'.$image);
and then the contents of the image/file would be displayed on the page. Is there anyway that this may be exploitable? My research shows that it could be exploitable if the string was added in the suffix rather than prepended because that would allow a nullbyte to stop the file_get_contents function from reading more of the argument. But what if it's the other way around?