PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | src/Helpers/Utils.php +3 -10 4.16.64.16.9 View file →
@@ -197,8 +197,10 @@
197 197 return false;
198 198 }
199 199
200 200 /**
201 + * @since 4.16.7.2 Returns false instead of the raw serialized string when an object is detected
202 + * @since 4.16.6 Returns $data when $unserializedData constins __PHP_Incomplete_Class
201 203 * @since 3.17.2
202 204 */
203 205 public static function safeUnserialize($data)
204 206 {
@@ -215,19 +217,10 @@
215 217 * this option is the same as defining it as true: PHP will attempt to instantiate objects of any class.
216 218 */
217 219 $unserializedData = @unserialize(trim($data), ['allowed_classes' => false]);
218 220
219 - /**
220 - * Never return objects, not even as __PHP_Incomplete_Class instances. When a
221 - * __PHP_Incomplete_Class is serialized again, PHP writes the original class bytes
222 - * back, so returning it would re-arm the payload for the next unrestricted
223 - * unserialize() call (e.g. the donation session storage). In that case, we return
224 - * the data as a plain string instead, keeping it inert.
225 - *
226 - * @since 4.16.6
227 - */
228 221 if (self::containsPhpIncompleteClass($unserializedData)) {
229 - return $data;
222 + return false;
230 223 }
231 224
232 225 /*
233 226 * In case the passed string is not unserializeable, false is returned.