8 v5 e$ l! H# I1 _' K修复方案:/ L3 H" ~# b+ }7 }
3 {/ _- W& g V5 \
Apache官方提供4种错误处理方式(http://httpd.apache.org/docs/2.0/mod/core.html#errordocument),如下1 h% O! q& N& ]8 b
, r' j1 j$ ^4 }. C2 h
In the event of a problem or error, Apachecan be configured to do one of four things,2 S5 u% C) f: M! d# Y# i+ m. P
7 I/ Z' z0 z% L% {& n2 m0 p1. output asimple hardcoded error message输出一个简单生硬的错误代码信息 : r+ S' Q) f" u! _! T6 E2. output acustomized message输出一段信息 , u* q! \9 z- m3. redirect to alocal URL-path to handle the problem/error转向一个本地的自定义页面 5 h( B$ ? w7 v* v& A' A1 Q4. redirect to an external URL to handle theproblem/error转向一个外部URL 6 k5 W) Q' i6 O& `7 X2 b6 y8 s* H) `: r
经测试,对于400错误只有方法2有效,返回包不会再包含cookie内容/ V* l+ E7 c4 ^$ S4 c9 f+ r: }
7 i5 ~# a h7 d
Apache配置:# e! R. O U/ H# x+ O3 Q, `; Q
: ]- H4 \6 u% P4 v* D$ y
ErrorDocument400 " security test" ' C+ S/ @# H2 D. n3 m 0 p4 o# u& H. ^) K当然,升级apache到最新也可:)。 5 E# ^- S: n- V" L* J2 @. M* U- d; ]& M9 ]# f. A! M
参考:http://httpd.apache.org/security/vulnerabilities_22.html6 p# ^" I& \; r, j& x