English 中文(简体)
D. 下载网站安全相关问题
原标题:downloading security related problem in php
  • 时间:2010-05-31 07:35:07
  •  标签:
  • php
  • security

hi i have to upload a video.but i want to gives permission only authenticate user to download .but i have a problem in that.because if any body type the video detail in browser.(ex http://sitename/folder_name/videoname) then browser download that video.but i don t want this .please suggest me how can i resolve this problem.either i should generate the video name randomly or make a temporary folder in which video reside only for specific time,after this video will be delete. Or if any other ideas you have please let me know Thanks in advance

问题回答

将文件上载到网络外的夹子上,因此无法直接查阅。 然后,如果用户获准查阅所请求的档案,则制作一份说明,为浏览器提供文档。 在提供网页之前,作为谨慎的言辞,请看看看看看看看看看模拟袭击,确保你打的脚本容易受攻击。

我认为,Kim L的思想是最好的,但如果你只想对名录进行基本用户名/密码检查,则尝试这样做(如果阿帕奇2正在主办你的网站):

1. 在名录中建立“htaccess”文档,并填写如下:

RedirectMatch 404 /passwd$
AuthType Basic
AuthName "Password required"
AuthUserFile /var/www/sitename/folder_name/passwd
Require valid-user

现在添加一个密码:

htpasswd -c -m /var/www/sitename/folder_name/passwd username

页: 1 See man htpasswd for details.

你们需要把阿帕奇2混为一谈,然后才能工作。 也许,你最好不要把 pass子放在同一个目录上;它最好在文件根基之外储存,但仅举一例。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

MALICIOUS_CODE EI_EXPOSE_REP Medium

I run findbugs against all of my code and only tackle the top stuff. I finally got the top stuff resolved and now am looking at the details. I have a simple entity, say a user: public class User ...

XSS on jsbin.com

Anyone know if jsbin.com implements any protection for XSS or other javascript attacks? I see jsbin links used fairly regularly on sites like this one and I can t find any indication from the site ...

Make md5 strong

Im making a website that will intergrate with game that only support md5 hashing metod (atm). Which ofc is not especially safe anymore. But how could i make it stronger? Should I just generate long ...

Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

热门标签