[mythtv] DB Error in logs [again, new poster]
Jay
jay-lists at 3pound.com
Fri Dec 24 07:22:54 UTC 2004
Greetings, (1st post)
As of CVS 23-Dec-2004, line 2014 of mythcontext.cpp,
MythContext::LogEntry starts out:
result.prepare("INSERT INTO mythlog (module, priority, "
"logdate, host, message, details) "
"values (:MODULE, :PRIORITY, now(), :HOSTNAME, "
":MESSAGE, :DETAILS );";
.. but the 'details' string is never escaped/quoted, which can result in
statements like:
INSERT INTO mythlog (module, priority, logdate, host, message, details)
values ( 'scheduler', 5, now(), 'obergrim', 'Finished recording',
'Finished recording Chappelle's Show on channel: 1054' );
^--- unquoted apostrophe
This was pointed out to mythtv-users by Bill Oberman on December 2, but
there was no reply.
http://www.mail-archive.com/mythtv-users@mythtv.org/msg00281.html
---
I noticed other mythtv files using: replace(QRegExp("\'"), "\\'")
.. is this the 'standard' mythtv way, or am I missing a library function
similar to QSqlDriver::formatValue()?
Thanks for a great package,
-Jay J
More information about the mythtv-dev
mailing list