WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#36416 new enhancement

maybe_unserialize returns false if non trimmed string is passed but is_serialized returns true

Reported by: pbearne Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords: has-patch has-unit-tests dev-feedback
Focuses: Cc:
PR Number:

Description

In maybe_unserialize we use is_serialized to protect the call to unserialize but is_serialized trim's the string so fails to protect unserialize call

Added a trim and updated code formatting to fix

Attachments (1)

trimed.patch (3.1 KB) - added by pbearne 4 years ago.
patch with unit tests

Download all attachments as: .zip

Change History (3)

@pbearne
4 years ago

patch with unit tests

#1 @pbearne
4 years ago

  • Keywords has-patch has-unit-tests dev-feedback added

#2 @DrewAPicture
4 years ago

  • Version changed from trunk to 2.0
Note: See TracTickets for help on using tickets.