Make WordPress Core

Ticket #17375: 17375.3.patch

File 17375.3.patch, 964 bytes (added by hakre, 14 years ago)

fix for d serialized values as well, see #9930

  • wp-includes/functions.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress
     
    261261                return false;
    262262        $token = $data[0];
    263263        switch ( $token ) {
     264                case 'S' :
    264265                case 's' :
    265266                        if ( '"' !== $data[$length-2] )
    266267                                return false;
    267268                case 'a' :
     269                case 'C' :
    268270                case 'O' :
    269271                        return (bool) preg_match( "/^{$token}:[0-9]+:/s", $data );
    270272                case 'b' :
    271273                case 'i' :
    272274                case 'd' :
    273                         return (bool) preg_match( "/^{$token}:[0-9.E-]+;\$/", $data );
     275                        return (bool) preg_match( "/^{$token}:[0-9.EeINF+-]+;\$/", $data );
    274276        }
    275277        return false;
    276278}
     
    295297                return false;
    296298        elseif ( ';' !== $data[$length-1] )
    297299                return false;
    298         elseif ( $data[0] !== 's' )
     300        elseif ( $data[0] !== 's' && $data[0] !== 'S' )
    299301                return false;
    300302        elseif ( '"' !== $data[$length-2] )
    301303                return false;