<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[16637] trunk/wp-includes/comment.php: Drop pingback/
trackback blogroll whitelisting feature.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16637">16637</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2010-11-30 22:46:35 +0000 (Tue, 30 Nov 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Drop pingback/trackback blogroll whitelisting feature. Too many ways to abuse it. props avereha. props vladimir_kolesnikov. fixes <a href="http://trac.wordpress.org/ticket/13887">#13887</a> for trunk</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludescommentphp">trunk/wp-includes/comment.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludescommentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment.php (16636 => 16637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment.php        2010-11-30 21:50:57 UTC (rev 16636)
+++ trunk/wp-includes/comment.php        2010-11-30 22:46:35 UTC (rev 16637)
</span><span class="lines">@@ -18,9 +18,8 @@
</span><span class="cx"> * check fails. If any of the parameter contents match the blacklist of words,
</span><span class="cx"> * then the check fails.
</span><span class="cx"> *
</span><del>- * If the comment is a trackback and part of the blogroll, then the trackback is
- * automatically whitelisted. If the comment author was approved before, then
- * the comment is automatically whitelisted.
</del><ins>+ * If the comment author was approved before, then the comment is
+ * automatically whitelisted.
</ins><span class="cx"> *
</span><span class="cx"> * If none of the checks fail, then the failback is to set the check to pass
</span><span class="cx"> * (return true).
</span><span class="lines">@@ -82,16 +81,7 @@
</span><span class="cx">
</span><span class="cx">         // Comment whitelisting:
</span><span class="cx">         if ( 1 == get_option('comment_whitelist')) {
</span><del>-                if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
-                        $uri = parse_url($url);
-                        $domain = $uri['host'];
-                        $uri = parse_url( home_url() );
-                        $home_domain = $uri['host'];
-                        if ( $wpdb->get_var($wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_url LIKE (%s) LIMIT 1", '%'.$domain.'%')) || $domain == $home_domain )
-                                return true;
-                        else
-                                return false;
-                } elseif ( $author != '' && $email != '' ) {
</del><ins>+                if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) {
</ins><span class="cx">                         // expected_slashed ($author, $email)
</span><span class="cx">                         $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1");
</span><span class="cx">                         if ( ( 1 == $ok_to_comment ) &&
</span></span></pre>
</div>
</div>
</body>
</html>