Problem editing comments with no title
Can this be set by a switch, not hard-coded?
Version: 5.1.14
URL:
|
bsienk
Beginner Usergroup: Member Joined: Jun 30, 2009 Total Topics: 4 Total Posts: 6 |
Posted 12/28/09 - 1:57 PM:
In our installation, we are choosing not to require users to have a 'title' or subject when entering a comment. Most comments are very succint and don't really need one. We've discovered that when we are logged in as Admin and we wish to edit a comment, we can't. When we submit the update, we get an error message similar to the following:
I've truncated the query, but you'll get the gist of it. In looking around the code, I see that this comes from ../databases/mysql.php or ../databases/mysqli.php in a line that is hard-coded to prevent UPDATEs where the title field is empty:
This looks like the root of our problem. Unless I'm missing some obvious way to turn this off, I will comment this out, for now, since for us comments are not really threaded and it doesn't make a difference. However, this might get overwritten by a future software update. Would you consider making this controlled by a switch in the future? Thanks! |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 12/29/09 - 1:07 AM:
mysqli.php has the correct if (stristr(str_replace('updated', '', str_replace('update`', '', $query)), "UPDATE") && stristr($query, '_links') && (stristr($query, " title=''") || stristr($query, " title = ''"))) die("Potentially dangerous query intercepted: $query -- <b>Please report this message to the site administrator.</b>"); // try to catch the PF thread erasing bugand mysql.php has the version you list above, which doesn't properly restrict it to only run the check for links and not comments. Fixed mysql.php for next release. |
Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Print