WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#31317 closed defect (bug) (duplicate)

is_serializable doesn't check for data created with a custom serialize

Reported by: jamesgol Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.5
Component: Options, Meta APIs Keywords: has-patch
Focuses: Cc:

Description

If someone uses a custom serialize as in
http://php.net/manual/en/class.serializable.php

The serialized string will look like this

C:3:"obj":23:{s:15:"My private data";}

WordPress will happily serialize an object like this and store it in the options table, but on retrieve the raw string is returned. wp-includes/function.php:is_serialized() doesn't know about this type of string. Patch included to fix this

Attachments (1)

serialize-custom.diff (374 bytes) - added by jamesgol 4 years ago.

Download all attachments as: .zip

Change History (4)

#1 @Shelob9
4 years ago

  • Keywords has-patch added

#2 @sc0ttkclark
4 years ago

  • Version changed from trunk to 2.0.5

Would love to see this fixed too.

#3 @SergeyBiryukov
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #17375.

Note: See TracTickets for help on using tickets.