[英]Captcha not working properly, still allowing posts
我有一個帶有論壇的WordPress博客,我只希望Guest(未注冊用戶)能夠發布到論壇。 我使用的插件僅用於為此目的提供驗證碼,但是當我嘗試在不輸入驗證碼的情況下進行發布時,我收到了“安全代碼不匹配”的消息,無論如何該帖子都出現了。
從處理驗證碼的文件中:
if($options['forum_captcha'] == true && !$user_ID){
if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
unset($_SESSION['security_code']);
}
else {
$error = true;
$msg = __("Security code does not match", "vasthtml");
}
}
知道為什么會這樣嗎?
感謝您的輸入。 我可以通過執行以下操作來修復插件:
if($options['forum_captcha'] == true && !$user_ID){
if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
unset($_SESSION['security_code']);
}
else {
$error = true;
$msg = __("Security code does not match", "vasthtml");
wp_die($msg);
}
}
是的,這是一種使用驗證碼的古怪方式,但是現在可以使用了。 大量的HTML欠我一個!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.