PHP Security: User defined file includes

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

A way to improve this would also to be to use the scandir() php function to generate an array, then unset the 0 and 1 entries (these are the . and .. entries) to create a whitelist of files. Also, keep in mind that this will include the php file extension for the whitelist, so when you compare, be sure to include that in the if statement.

FFVison
Автор

Hi alex :) I am a long time viewer back to your showcast on thenewboston channel :)
I wish I can see the topic on opcache, openssl, and any php zip function for reducing http request file size
anyways, hope to see your video soon again :)

autowind
Автор

Good job, thanks!
i have some ideas for tutorials i want to see from you (sorry german),
PHP Layout Compiler / Parser or whatever, PHP shop system, php file hosting and maybe something with ssh

iKyroja
Автор

This is a very good explanation!
I actually ran into this issue recently, where a colleague made me do something like the following:



And I could read the server's /etc/passwd file, big problems.

DaBananaboat
Автор

what if you use basename() <- dont solve the problem ?


+Codecourse

TopAmazing-rfkd
Автор

how to view index page else show get file content

lakshmanana
Автор

lame... what if u have two thousand files

comarnicolodi
welcome to shbcf.ru