更新Drupal后报告出现错误See http://drupal.org/SA-CORE-2013-003 for information...

本文介绍了解决Drupal 7从7.22升级到7.26后出现的安全警告问题。主要针对公共文件目录和临时文件目录未被充分保护的问题,通过修改.htaccess文件来增强安全性。

将Drupal 7.22更新到 7.26后,report报告里出现两个错误:

 

Public files directory                                                                           Not fully protected
See http://drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which should be added to the sites/default/files directory to help protect against arbitrary code execution.

 

Temporary files directory                                                                    Not fully protected
See http://drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which should be added to the c:\windows\temp directory to help protect against arbitrary code execution.

 

点开See后面的连接,内容有点多,不管其他的,按下面的方法处理后错误消失

看上面的错误,大意是说公共文件路径和临时文件路径没有完全保护,叫修改.htaccess文件后添加到sites/default/files目录和c:\windows\temp目录。

 

找到sites/default/files目录下,发现有一个.htaccess文件,去掉写保护,用写字板打开,替换下面的内容,然后保存,并把这个文件复制到c:\windows\temp临时文件目录下即可。

 

# Turn off all options we don't need.
Options None
Options +FollowSymLinks

# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
</Files>

# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值