Re: [RFC] New custom object serialization mechanism

From: Date: Wed, 30 Jan 2019 09:20:11 +0000
Subject: Re: [RFC] New custom object serialization mechanism
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-103884@lists.php.net to get a copy of this message
Hi Nikita, https://wiki.php.net/rfc/custom_object_serialization > In the RFC, you mention that "Executing arbitrary code in the middle of unserialization is dangerous and has led to numerous unserialize() vulnerabilities in the past. For this reason __wakeup() calls are now delayed until the end of unserialization." How about destructors? Some vulnerabilities come from destructors doing things with unserialized state. Would it be possible/a good idea to *not* call any destructors unless the "wakeup" stage has been successful? Any exceptions thrown during __wakeup/__unserialize would mean the unserialized data structure should be destroyed without calling any destructors? WDYT? Nicolas

« previous php.internals (#103884) next »