[wp-trac] [WordPress Trac] #52506: Add escaping method for table names in SQL queries

WordPress Trac noreply at wordpress.org
Sat Jan 28 21:49:39 UTC 2023


#52506: Add escaping method for table names in SQL queries
-------------------------------------------------+-------------------------
 Reporter:  tellyworth                           |       Owner:
                                                 |  davidbaumwald
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Database                             |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-unit-tests early needs-docs      |     Focuses:
  has-patch needs-testing needs-dev-note         |  performance
-------------------------------------------------+-------------------------

Comment (by jrf):

 Just a question - I can see the use of `str_ends_with()` has been replaced
 now, but couldn't this have been solved by moving the `include` for the
 `wp-includes/compat.php` file up ? I though that was loaded pretty early
 anyway, so I was surprised to see the error being reported.

 Note: I'm on the road, so haven't had a chance to properly look at the
 loading bootstrap. It's just a question which popped up in my mind when I
 saw the error and the chosen fix. Not meant as a criticism in any way.

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


More information about the wp-trac mailing list