From 50adec45c5445381b356f6aa55b3d5900459b9ba Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 6 Jul 2017 11:45:17 -0400 Subject: [PATCH] Strip non 7-bit ascii chars from log message --- web/ajax/log.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/ajax/log.php b/web/ajax/log.php index c38a6d5d0..81312d709 100644 --- a/web/ajax/log.php +++ b/web/ajax/log.php @@ -95,6 +95,7 @@ switch ( $_REQUEST['task'] ) foreach ( dbFetchAll( $sql, NULL, $values ) as $log ) { $log['DateTime'] = preg_replace( '/^\d+/', strftime( "%Y-%m-%d %H:%M:%S", intval($log['TimeKey']) ), $log['TimeKey'] ); $log['Server'] = ( $log['ServerId'] and isset($servers_by_Id[$log['ServerId']]) ) ? $servers_by_Id[$log['ServerId']]->Name() : ''; + $log['Message'] = preg_replace('/[\x00-\x1F\x7F-\xFF]/', '', $log['Message'] ); $logs[] = $log; } $options = array();