Skip to content
Snippets Groups Projects
Commit 6ab0dff2 authored by Peter Rotich's avatar Peter Rotich
Browse files

Sanitize log entries

parent ea1ed4f6
No related branches found
No related tags found
No related merge requests found
......@@ -297,11 +297,11 @@ class osTicket {
//Save log based on system log level settings.
$loglevel=array(1=>'Error','Warning','Debug');
$sql='INSERT INTO '.SYSLOG_TABLE.' SET created=NOW(), updated=NOW() '.
',title='.db_input($title).
',log_type='.db_input($loglevel[$level]).
',log='.db_input($message).
',ip_address='.db_input($_SERVER['REMOTE_ADDR']);
$sql='INSERT INTO '.SYSLOG_TABLE.' SET created=NOW(), updated=NOW() '
.',title='.db_input(Format::sanitize($title, true))
.',log_type='.db_input($loglevel[$level])
.',log='.db_input(Format::sanitize($message, false))
.',ip_address='.db_input($_SERVER['REMOTE_ADDR']);
db_query($sql, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment