From fe77b960511816b0933b292bbe3856f1861cbb90 Mon Sep 17 00:00:00 2001
From: "cedric@yterium.com" <>
Date: Tue, 26 Jul 2011 07:16:02 +0000
Subject: [PATCH] http://core.spip.org/issues/2183 : ne pas perturber les
 criteres conditionnels en appliquant intval sur les valeurs vides

---
 ecran_securite.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ecran_securite.php b/ecran_securite.php
index 5faa101..26114e0 100644
--- a/ecran_securite.php
+++ b/ecran_securite.php
@@ -5,7 +5,7 @@
  * ------------------
  */
 
-define('_ECRAN_SECURITE', '1.0.4'); // 6 avr. 2011
+define('_ECRAN_SECURITE', '1.0.5'); // 26 juil. 2011
 
 /*
  * Documentation : http://www.spip.net/fr_article4200.html
@@ -34,13 +34,13 @@ if (!defined('_IS_BOT'))
  *       (sauf pour id_table, qui n'est pas numerique jusqu'a [5743])
  */
 foreach ($_GET as $var => $val)
-	if (strncmp($var,"id_",3)==0 AND $var!='id_table')
+	if ($_GET[$var] AND strncmp($var,"id_",3)==0 AND $var!='id_table')
 		$_GET[$var] = is_array($_GET[$var])?@array_map('intval',$_GET[$var]):intval($_GET[$var]);
 foreach ($_POST as $var => $val)
-	if (strncmp($var,"id_",3)==0 AND $var!='id_table')
+	if ($_POST[$var] AND strncmp($var,"id_",3)==0 AND $var!='id_table')
 		$_POST[$var] = is_array($_POST[$var])?@array_map('intval',$_POST[$var]):intval($_POST[$var]);
 foreach ($GLOBALS as $var => $val)
-	if (strncmp($var,"id_",3)==0 AND $var!='id_table')
+	if ($GLOBALS[$var] AND strncmp($var,"id_",3)==0 AND $var!='id_table')
 		$GLOBALS[$var] = is_array($GLOBALS[$var])?@array_map('intval',$GLOBALS[$var]):intval($GLOBALS[$var]);
 
 
-- 
GitLab