首页 > 博客相关『Blogger/WordPress』 > Ticket #11289, IE bug fix Error

Ticket #11289, IE bug fix Error

In the past 3 days ,every day there were almost 100 spam comments. The Askmit recognized these spams ,but i have to delete these spams myself .I dislike to do this ,so i reactived the Math comment spam protection plugin.However the plugin dosen’t work very well, if u post a comment with the answer blank or wrong ,it will just show u the fallow error message like this:

1
2
3
4
5
6
7
8
9
10
<!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono -->
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WordPress ? Error</title>
<link rel="stylesheet" href="http://www.h4ck.ws/wp-admin/css/install.css" type="text/css" />
</head>
<body id="error-page">
<p>ERROR: Somethin here.</p></body>
</html>


The error message can be located in the wp-includes/functions.php file at the line 2740:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono -->
<html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) ) language_attributes(); ?>>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>< ?php echo $title ?></title>
	<link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" />
< ?php
if ( 'rtl' == $text_direction ) : ?>
	</link><link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install-rtl.css" type="text/css" />
< ?php endif; ?>
</link></head>
<body id="error-page">
< ?php endif; ?>
	< ?php echo $message; ?>
</body>
</html>

But the error was caused by the wp_die() function in the file plugins/math-comment-spam-protection/math-comment-spam-protection.php at the line 217:

1
2
3
4
5
6
7
8
switch ($result) {
  case 'No answer': 
      wp_die( apply_filters('pre_comment_content', stripslashes($this->g_opt['mcsp_opt_msg_wrong_answer'])) );
      break;
 case 'Wrong answer': 
     wp_die( apply_filters('pre_comment_content', stripslashes($this->g_opt['mcsp_opt_msg_wrong_answer'])) );
     break;
}

The error message was posted by the wp_die() function,vie google i found that the wp_die() funciton is just do the same thing as die() fuction.So i replaced the wp_die() with die(),then the error message disappered.lol.

1
2
3
4
5
6
7
8
9
10
switch ($result) {
  case 'No answer': 
     echo "<script language='JavaScript'>window.alert('错误:请在评论框下方的区域中输入右侧数学运算的运算结果!');</script>";
     die();
     break;
 case 'Wrong answer': 
    echo "<script language='JavaScript'>window.alert('错误:结果错误,请重新进行运算后输入正确的结果!');</script>";	
    die();
    break;
}

原创文章,转载请注明: 转载自 火星信息安全研究院

本文标题: 《Ticket #11289, IE bug fix Error》

本文链接地址: http://www.h4ck.org.cn/2010/12/ticket-11289-ie-bug-fix-error/

  1. Georgegag 3月 15th, 2017 @ 21:53 | #-49

    Online Casino Links – Online Casino Rewards, Black Jack Ballroom Casino.

评论提交中, 请稍候...

留言

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks