Last active
January 24, 2019 15:45
-
-
Save vah13/bc7a1ae2105857860acbf5df2c61b4d6 to your computer and use it in GitHub Desktop.
Evil content-disposition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fileList = glob('/var/www/html/uploads/*.jpg'); | |
$fname = pathinfo($fileList[0])['basename']; | |
header('Content-Type: image/jpeg'); | |
header("Content-disposition: attachment; filename=$fname"); | |
readfile("/var/www/html/uploads/".$fname); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment