Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 9 years ago

#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)

#1 @johnbillion
20 years ago

  • Resolution → worksforme
  • Status new → closed

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_meta in wp-includes/functions.php).

This ticket was mentioned in ​Slack in #forums by xkon. ​View the logs.


9 years ago

Note: See TracTickets for help on using tickets.