[wp-trac] [WordPress Trac] #43664: $wpdb->get_results fails in specific cases with non-latin charaters in where clause

WordPress Trac noreply at wordpress.org
Fri Mar 30 10:56:52 UTC 2018


#43664: $wpdb->get_results fails in specific cases with non-latin charaters in
where clause
--------------------------+------------------------------
 Reporter:  altert        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  4.9.4
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by altert):

 most likely the culprit is regexp in {{{get_table_from_query}}} function
 in {{{wp-includes/wp-db.php}}}

 It is called from {{{check_safe_collation}}} on non-asciii queries.

 Possible solution would be to assume that last 'from' in query should be
 used and therefore non-greedy modifier should be dropped from select-from
 matching, so {{{SELECT.*?\s+FROM}}} should be  {{{SELECT.*\s+FROM}}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43664#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list