瀏覽代碼

sanitized username for logging functions

CauseFX 4 年之前
父節點
當前提交
a42ed9f48b
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      api/functions/log-functions.php

+ 3 - 0
api/functions/log-functions.php

@@ -211,6 +211,9 @@ trait LogFunctions
 	{
 		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)) {