mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-11-09 18:06:35 +00:00
Merge pull request #1055 from oddstr13/pr-fix-1040-1
Escape null character in log output
This commit is contained in:
commit
436b4dbee4
1 changed files with 4 additions and 0 deletions
|
|
@ -65,6 +65,10 @@ class LogHandler(logging.StreamHandler):
|
|||
for token in self.sensitive["Token"]:
|
||||
string = string.replace(token or "{token}", "{jellyfin-token}")
|
||||
|
||||
# Kodi chokes on null-characters in log output, escape it.
|
||||
if "\x00" in string:
|
||||
string = string.replace("\x00", "\ufffdx00\ufffd")
|
||||
|
||||
xbmc.log(string, level=self.level)
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue