How to safely prevent uploaded file from being run via PHP on any server?

后端 未结 10 2167
独厮守ぢ
独厮守ぢ 2021-02-15 13:13

I noticed that it\'s possible to run a file via PHP even if its extension wasn\'t .php, for example file test.xyz.php.whatever.zyx can be still run wit

10条回答
  •  遥遥无期
    2021-02-15 13:46

    On Apache you could disable all dynamic handlers for the directory that contains the untrusted files.

    SetHandler default-handler
    

提交回复
热议问题