--- loncom/lonsql 2007/01/03 01:59:42 1.79 +++ loncom/lonsql 2007/04/03 17:51:45 1.80 @@ -3,7 +3,7 @@ # The LearningOnline Network # lonsql - LON TCP-MySQL-Server Daemon for handling database requests. # -# $Id: lonsql,v 1.79 2007/01/03 01:59:42 raeburn Exp $ +# $Id: lonsql,v 1.80 2007/04/03 17:51:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -425,6 +425,7 @@ sub make_new_child { } else { $result=&courselog($path,$command); } + $result = &escape($result); } else { &logthis('Unable to do log query: '.$uname.'@'.$udom); $result='no_such_file'; @@ -1051,11 +1052,13 @@ sub userlog { { $include=0; } if (($filters{'end'}) && ($timestamp>$filters{'end'})) { $include=0; } + if (($filters{'action'} eq 'Role') && ($log !~/^Role/)) + { $include=0; } if (($filters{'action'} eq 'log') && ($log!~/^Log/)) { $include=0; } if (($filters{'action'} eq 'check') && ($log!~/^Check/)) { $include=0; } if ($include) { - push(@results,$timestamp.':'.$log); + push(@results,$timestamp.':'.$host.':'.&escape($log)); } } close IN;