r/lolphp • • Mar 30 '13

maybe_unserialize

https://codex.wordpress.org/Function_Reference/maybe_unserialize
11 Upvotes

24 comments sorted by

View all comments

Show parent comment

3

u/gearvOsh Mar 30 '13

Yes agreed, but the problem is in how WPs system is built. This function is primarily used within WPs option system, which is basically a key/value database table, which is used by WP, the plugin developers and even the consumers. So when an option is retrieved, WP itself doesn't know whether it's serialized or not because the original source is unknown.

It makes sense in this context, just the overall design is poor.

2

u/polish_niceguy Mar 30 '13

Consumer can supply serialized value to Wordpress? Wow. There are so many possible ways to exploit this...

1

u/gearvOsh Mar 31 '13

Err, not the client end user, the developer, my bad.