スポンサーリンク

BlognPlusのコメントスパム対策機能修正

スポンサーリンク

本ブログにコメントする方はほとんどいないのですが、コメント時にスパム判定の点数が妙に高くなって弾かれることがあるようなので調査しました。
リファラ(どこのページからきたか)の判定がおかしくなっていました。静的URL化の影響です。
BlognPlusのフォルダ内module/asm4cmt/spamchk.phpの以下の箇所を修正しました。相変わらず泥臭いコーディングですが。

// if(!stristr(BLOGN_HOMELINK, $purl[“host”]) || $qurl[0] != “e” || $qurl[1] != $id) {
if(!stristr(BLOGN_HOMELINK, $purl[“host”]) || (($qurl[0] != “e” || $qurl[1] != $id) && ($purl[“path”] != BLOGN_REQUESTDIR.”e”.$id.”.html”))) {

要は、index.php?e=123でもe123.htmlでも記事IDさえ正しければスパム判定しないということです。

コメント

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny

タイトルとURLをコピーしました