diff --git a/api/functions/log-functions.php b/api/functions/log-functions.php index 9a5255f59..defa8b02d 100644 --- a/api/functions/log-functions.php +++ b/api/functions/log-functions.php @@ -211,6 +211,9 @@ public function setLoggerChannel($channel = 'Organizr', $username = null) { if ($this->hasDB()) { $setLogger = false; + if ($username) { + $username = filter_var($username, FILTER_SANITIZE_STRING); + } if ($this->logger) { if ($channel) { if (strtolower($this->logger->getChannel()) !== strtolower($channel)) {