|
|
|
|
|
by meowface
4406 days ago
|
|
Not to mention that many Apache configurations will use mod_mime, which by default enables multiple extensions. So if someone uploads a file called `image.php.jpg`, the file is executed by Apache as PHP code. And obviously verifying the MIME type or even the content of the file won't help you here, since you can just write a JPEG header and then throw in `<?php system("..."); ?>` after it. Even when you think you're safe based on what you'd consider to be obvious assumptions ("the file extension is whatever comes up after the last period"), there are weird things like this that might bite you. |
|