Changeset 49987 in spip-zone


Ignore:
Timestamp:
Jul 26, 2011, 7:16:02 AM (10 years ago)
Author:
cedric@…
Message:

http://core.spip.org/issues/2183 : ne pas perturber les criteres conditionnels en appliquant intval sur les valeurs vides

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _core_/securite/ecran_securite.php

    r46421 r49987  
    66 */
    77
    8 define('_ECRAN_SECURITE', '1.0.4'); // 6 avr. 2011
     8define('_ECRAN_SECURITE', '1.0.5'); // 26 juil. 2011
    99
    1010/*
     
    3535 */
    3636foreach ($_GET as $var => $val)
    37         if (strncmp($var,"id_",3)==0 AND $var!='id_table')
     37        if ($_GET[$var] AND strncmp($var,"id_",3)==0 AND $var!='id_table')
    3838                $_GET[$var] = is_array($_GET[$var])?@array_map('intval',$_GET[$var]):intval($_GET[$var]);
    3939foreach ($_POST as $var => $val)
    40         if (strncmp($var,"id_",3)==0 AND $var!='id_table')
     40        if ($_POST[$var] AND strncmp($var,"id_",3)==0 AND $var!='id_table')
    4141                $_POST[$var] = is_array($_POST[$var])?@array_map('intval',$_POST[$var]):intval($_POST[$var]);
    4242foreach ($GLOBALS as $var => $val)
    43         if (strncmp($var,"id_",3)==0 AND $var!='id_table')
     43        if ($GLOBALS[$var] AND strncmp($var,"id_",3)==0 AND $var!='id_table')
    4444                $GLOBALS[$var] = is_array($GLOBALS[$var])?@array_map('intval',$GLOBALS[$var]):intval($GLOBALS[$var]);
    4545
Note: See TracChangeset for help on using the changeset viewer.