Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #57149, comment 1


Ignore:
Timestamp:
11/21/2022 02:15:47 AM (18 months ago)
Author:
johnjamesjacoby
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57149, comment 1

    v3 v4  
    6060  1. Instead, ''most likely'', these queries should be concatenated, unescaped and unprepared, and manually slashed to accommodate the desired matching. In this way, the core `str_replace( '\\_', '_', $maybe[2] )` is surprisingly accurate:
    6161{{{
    62 $like = 'wp\\\_\\\_\\\_\\\_users';
     62$like = "'wp\\\_\\\_\\\_\\\_users'";
    6363$sql = 'SHOW TABLES LIKE ' . $like;
    6464$query = $wpdb->get_var( $sql );