我在cformsII插件的服务器日志中发现错误,但不理解原因。
PHP Notice: Undefined index: b in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 12
[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice: Undefined index: f in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 15
[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice: Undefined index: f1 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 18
[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice: Undefined index: f2 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 19
[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice: Undefined index: a1 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 21
[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice: Undefined index: a2 in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 22
[Tue Jul 12 15:02:26 2011] [error] [client 172.18.30.81] PHP Notice: Undefined index: l in /var/www/wordpressmu/wp-content/plugins/cforms/cforms-captcha.php on line 30
验证码图像的url为
http://mysite/wp-content/plugins/cforms/cforms-captcha.php?ts=3&c1=4&c2=5&ac=abcdefghijkmnpqrstuvwxyz23456789&i=i&w=115&h=25&c=#A6BEA4&l=000066&f=font4.ttf&a1=-20&a2=11&f1=17&f2=19&b=12.gif&rnd=448710正如您所看到的,抛出错误的变量包含在querystring中。
此语句出错(prep是一个删除斜杠的函数):
$im_bg_url = \'captchabg/\' . ( prep($_REQUEST[\'b\'],\'1.gif\') );