@hakre Just curious—since in Laravel every request is served through the index.php file as the starting point of the framework, if a .jpg or another file contains PHP code, will it be executable?
@Asif Hmm, actually it depends on the web server configuration which request is served through Laravel's index.php entry script. Only those delegated there are. You can find that in your webservers' configuration.
However, if the requests for binary resources are wired through a php script, I don't know if Laravel's routing would handle them from top of my head. And with handle it must not mean they are getting evaluated by PHP, Laravel may have just some functionality to serve them.
Better configure your webserver to not pass such requests into the PHP process manager if you are using FPM.
It is also important in this context of file uploads, that you never use the filename as given by the uploader. This does not only include the suffix/extension but the whole name.
I'm starting to experience the difficulty of searching for stuff through search engines that I've heard others complain about
Search engines just giving unrelated results, inaccurate results or zero results
@Asif I defer to hakre and AllenJB because they're generally more knowledgeable about stuff. With that said, I want to suggest also checking MIME type of the file, because it's possible for someone to give a file extension as jpg, but it not actually be a jpg file.
If you're on Linux, easy way to check is fileinfo <filename> if you have the file readily available, and having the file stored locally won't be a security risk...
google is no more. all i get is amazon affiliate links
we need web 3.0. no jabba script, static pages, easily indexable, semantic tags, like we were doing before people started to go nuts about js heavy web pages