{"id":230,"date":"2010-05-18T11:05:57","date_gmt":"2010-05-18T15:05:57","guid":{"rendered":"http:\/\/www.blogseye.com\/?p=230"},"modified":"2010-05-18T11:05:57","modified_gmt":"2010-05-18T15:05:57","slug":"comments-with-urls","status":"publish","type":"post","link":"http:\/\/blogseye\/2010\/05\/comments-with-urls.html","title":{"rendered":"Comments with URLs"},"content":{"rendered":"

I figure that the primary goal of comment spam is to insert a URL into a comment. I’ve edited my theme and deleted the url field in the comments and popup comments files, but I still get spam comments with data in the URL field. My guess is that they are hitting the wp-comments.php file directly.<\/p>\n

I wrote a plugin that hooks the preprocess_comment function and executes wp_die if the url field is filled in. Registered users have that field filled in automagically by the the wp-comments program so I have to check to see if the user is registered.<\/p>\n

I am also considering checking the http_referer header, but that can be spoofed and some paranoid users disable it.<\/p>\n

Since I don’t have a url field in the comments anymore I have to wait to see if spammers are calling it. I have to log the attempts, I guess.<\/p>\n","protected":false},"excerpt":{"rendered":"

I figure that the primary goal of comment spam is to insert a URL into a comment. I’ve edited my theme and deleted the url field in the comments and popup comments files, but I still get spam comments with data in the URL field. My guess is that they are hitting the wp-comments.php file […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/posts\/230"}],"collection":[{"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/comments?post=230"}],"version-history":[{"count":0,"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/posts\/230\/revisions"}],"wp:attachment":[{"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/media?parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/categories?post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blogseye\/wp-json\/wp\/v2\/tags?post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}