Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一种情况,我正在打开基于 $_SERVER['REMOTE_USER'] 变量的文件。我不认为这是欺骗性的,但只想确认一下。我不想让自己容易受到任意文件的读取:
<? $user = $_SERVER['REMOTE_USER']; $fp = fopen("./$user.png","r"); ?>
是的,该用户名是远程用户指定的任何内容。
您还需要验证密码。如果密码是由您的服务器而不是您的应用程序验证的,那么您可能没问题。