#2751 closed defect (bug) (worksforme)
Metavalues not properly escaped before being inserted into the database
| Reported by: | joaocosta | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 2.0.2 |
| Severity: | normal | Keywords: | db error |
| Cc: | Focuses: |
Description
Certain plugins use meta fields for specific purposes. When a post containing these meta fields is saved, their content is not being escaped and if the field contains special SQL characters, the result is a MySQL error.
The place where this error occurs is in wp-includes/functions.php, line 433.
I patched mine by adding a call to $wpdb->escape before the metavalue is inserted in the database.
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Worksforme. This was fixed somewhere between 2.0.4 and 2.1, and now the values are escaped before being inserted into the database (
add_post_metainwp-includes/functions.php).