You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not an active vulnerability anymore, but maybe it should still be considered a bad practice, since it makes the code harder to reason about? Like escaping, a single prepare() at the point of query execution is more straight-forward.
I think double prepares often result from building a query conditionally, but passing a static list of arguments to prepare(). A better practice IMO would be to pass an array of arguments, which is also built conditionally:
It's not an active vulnerability anymore, but maybe it should still be considered a bad practice, since it makes the code harder to reason about? Like escaping, a single
prepare()
at the point of query execution is more straight-forward.https://blog.ircmaxell.com/2017/10/disclosure-wordpress-wpdb-sql-injection-technical.html
https://make.wordpress.org/security/2017/11/13/the-war-on-sqli-or-what-happened-in-4-8-2-and-4-8-3/
The text was updated successfully, but these errors were encountered: