From 36d5acb7cb0d69995585330374b263dd7a166b6f Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Fri, 4 Dec 2009 22:12:40 +0000
Subject: [PATCH] report des bots
 http://zone.spip.org/trac/spip-zone/changeset/33517 +
 http://zone.spip.org/trac/spip-zone/changeset/33518

---
 config/ecran_securite.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/config/ecran_securite.php b/config/ecran_securite.php
index ba1fd0b784..ca000e57a1 100644
--- a/config/ecran_securite.php
+++ b/config/ecran_securite.php
@@ -5,7 +5,7 @@
  * ------------------
  */
 
-define('_ECRAN_SECURITE', '0.9'); // 26 nov 2009
+define('_ECRAN_SECURITE', '0.9.1'); // 4 dec 2009
 
 /*
  * Documentation : http://www.spip.net/fr_article4200.html
@@ -24,7 +24,8 @@ if (isset($_GET['test_ecran_securite']))
 if (!defined('_IS_BOT'))
 	define('_IS_BOT',
 		isset($_SERVER['HTTP_USER_AGENT'])
-		AND strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'bot') !== false
+		AND preg_match(', bot|slurp|crawler|spider|webvac|yandex,i',
+			$_SERVER['HTTP_USER_AGENT'])
 	);
 
 /*     - interdit de passer une variable id_article (ou id_xxx) qui ne
-- 
GitLab