From 811366147139876a6c945bcebe05a3403394fe1e Mon Sep 17 00:00:00 2001 From: defacer Date: Thu, 9 Sep 2004 10:58:25 +0000 Subject: [PATCH] Merging addslashes() change from stable. --- mod/chat/chatd.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod/chat/chatd.php b/mod/chat/chatd.php index 5d9f8a92d2..f940efe49a 100755 --- a/mod/chat/chatd.php +++ b/mod/chat/chatd.php @@ -408,9 +408,16 @@ class ChatDaemon { break; } + // A slight hack to prevent malformed SQL inserts + $origmsg = $msg->message; + $msg->message = addslashes($msg->message); + // Commit to DB insert_record('chat_messages', $msg); + // Undo the hack + $msg->message = $origmsg; + // OK, now push it out to all users $this->message_broadcast($msg, $this->sets_info[$sessionid]['user']); -- 2.39.5