There are a couple of update functions - system_update_6034, system_update_6039, system_update_6045 - in system.install that update the value of the 'perm' field in the permissions table. They both include the altered string directly in the UPDATE statement without escaping it. When I was upgrading my database from 5 to 6, this resulted in a MySQL syntax error, because some of the existing permission names included a possessive apostrophe ("access others' lists of watched posts" from the Watcher module).

I changed the queries to call db_escape_string and that fixed it. A patch of that change is attached.

CommentFileSizeAuthor
system.install.quotes.patch1.76 KBbrad.bulger

Comments

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.