{"id":221,"date":"2006-07-14T20:28:39","date_gmt":"2006-07-14T20:28:39","guid":{"rendered":"http:\/\/neosmart.net\/blog\/archives\/221"},"modified":"2023-01-28T15:53:20","modified_gmt":"2023-01-28T21:53:20","slug":"opera-patch-for-bad-behavior","status":"publish","type":"post","link":"https:\/\/neosmart.net\/blog\/opera-patch-for-bad-behavior\/","title":{"rendered":"Bad Behavior Patch for Opera Users"},"content":{"rendered":"<p><a href=\"http:\/\/www.homelandstupidity.us\/software\/bad-behavior\/\" rel=\"follow\">Bad Behavior<\/a> is an excellent &#8216;profiling&#8217; plug-in that deters most spam bots and attacks on web-based scripts, especially blogs, wikis, and forums. It uses a very detailed and sophisticated combination of checks and algorithms to create a &#8216;spammer&#8217;s profile&#8217; and if a visitor to your site fits it, it&#8217;ll block them.\n<\/p>\n<p>The algorithm is so good that there are almost no false positives, and together with a decent spam plug-in like Akismet or Spam Karma 2, you&#8217;re blog will be forever clean. But it has a problem with Opera. Most builds of Opera trigger a false alarm, leaving your blog reader-less, especially with the release of Opera 9, an excellent browser in all rights, but there is a solution. <!--more-->\n<\/p>\n<ol>\n<li>Download and extract <a href=\"http:\/\/www.homelandstupidity.us\/software\/bad-behavior\/bad-behavior-download\/\" rel=\"follow\">Bad Behavior<\/a> <\/li>\n<li>Open .\/bad-behavior\/common_tests.inc.php <\/li>\n<li>Comment out the code beginning from line 57 to line 60 (inclusive). It should look like this when you&#8217;re done:<br \/>\n<pre lang='c'>\/*&lt;br \/&gt;\nif (array_key_exists(&amp;#8216;Te&amp;#8217;, $package[&amp;#8216;headers_mixed&amp;#8217;])) {&lt;br \/&gt;\n if (!preg_match(&amp;#8216;\/\\bTE\\b\/&amp;#8217;, $package[&amp;#8216;headers_mixed&amp;#8217;][&amp;#8216;Connection&amp;#8217;])) {&lt;br \/&gt;\nreturn &amp;#8220;582ec5e4&amp;#8221;;&lt;br \/&gt;\n}&lt;br \/&gt;\n}&lt;br \/&gt;\n*\/<\/pre> <\/li>\n<li>Save the file, upload the directory to your wp-content\/plugins folder, activate, and enjoy! <\/li>\n<\/ol>\n<p><strong>The Technical Stuff<\/strong>\n<\/p>\n<p>What we just did is disable &#8220;TE Request-Header&#8221; checks. TE request-headers are from RFC2616, section 14.39; and although we have no doubt that the authors of this wonderful algorithm had their reasons for including TE request-header checks, and that certain spam bots do indeed employ this particular header-request for TE, as far as we can tell the benefits gained by using such a check are minor.\n<\/p>\n<p>You can view the entire RFC <a href=\"http:\/\/256.com\/gray\/docs\/rfc2616\/14-2.html\" rel=\"follow\">here<\/a>. At any rate, it doesn&#8217;t matter. Bad Behavior is famous for its excellence and cross compatibility, and lack of false positives, so we feel it should stay that way &#8211; without the TE request-header checks. An ideal solution would be to implement this function as a subset of &#8216;Strict Mode&#8217; which is specially designed to block more illicit traffic, but with the knowledge that it may block some legitimate users.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bad Behavior is an excellent &#8216;profiling&#8217; plug-in that deters most spam bots and attacks on web-based scripts, especially blogs, wikis, and forums. It uses a very detailed and sophisticated combination of checks and algorithms to create a &#8216;spammer&#8217;s profile&#8217; and &hellip; <a href=\"https:\/\/neosmart.net\/blog\/opera-patch-for-bad-behavior\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[56,59,54],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-software","tag-bugs","tag-opera","tag-wordpress"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4xDa-3z","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":1,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":5015,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/221\/revisions\/5015"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}