OK, adding this lines, I got this output:

///////////////////////////////////////////
object(Something)[1]
  public 'a' => string '123' (length=3)
  protected 'b' => string 'abc' (length=3)
  private 'c' => string 'xyz' (length=3)

string
'O:9:"Something":3:{s:1:"a";s:3:"123";s:4:"�*�b";s:3:"abc";s:12:"�Something�c";s:3:"xyz";}'
(length=89)

object(Something)[2]
  public 'a' => string '123' (length=3)
  protected 'b' => string 'abc' (length=3)
  private 'c' => string 'xyz' (length=3)
///////////////////////////////////////////

Unserialize process doesn't fail. Only serialized string has wrong characters.
        
The problem is that I'm working on an algorithm, which requires making hashing 
serialized in the chain with the data stored externally (cookies, database, 
files, ...). By comparing the hash to the server with the problem, with the 
hash stored in external storage, do not match.

Testing the same algorithm on another server with the same version of
PHP, produces no fault and get the desired result.

I also tried to install packages php, reconstructed with the command:

apt-get source -b libapache2-mod-php5

But given the same result.

Another info:   
If the serialized string is passed to other functions (such as encrypt and 
decrypt with mcrypt), apparently the string is "clean" of these strange 
characters.

PS: 2 friends with Ubuntu 8.10 have confirmed the fail.

-- 
php5 serialize() function corrupt strings
https://bugs.launchpad.net/bugs/310845
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to