# Bug: Allowed server names throw errors in logs via X-Plex-Device-Name header

**URL:** <https://forums.plex.tv/t/bug-allowed-server-names-throw-errors-in-logs-via-x-plex-device-name-header/804372>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-docker\
**Created:** [August 13, 2022, 10:10pm UTC](https://forums.plex.tv/t/bug-allowed-server-names-throw-errors-in-logs-via-x-plex-device-name-header/804372 "2022-08-13T22:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paperblankets](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/paperblankets/32/14210_2.png) [@paperblankets](https://forums.plex.tv/u/paperblankets)\
**Post date:** [August 13, 2022, 10:10pm UTC](https://forums.plex.tv/t/bug-allowed-server-names-throw-errors-in-logs-via-x-plex-device-name-header/804372/1 "2022-08-13T22:10:41Z")

</div>

Plex allows users to enter friendly names with special characters. As an example, a valid name is:

```auto
į̶̡̨̡̛̭̬̬͎̖̗̤̪̠̠͓̠̙̪͚̣̺̳̬͎̠̻̘̳͉̺̰͍͎̫̮̘͔̝̊̔̈́̍́̌͌̐͋̏͜͝ͅ⚪̴̨̧̛̖̱̝̦͕̙̣͔̙͖̻̒̑̂͑̇͌ į̶̡̨̡̛̭̬̬͎̖̗̤̪̠̠͓̠̙̪͚̣̺̳̬͎̠̻̘̳͉̺̰͍͎̫̮̘͔̝̊̔̈́̍́̌͌̐͋̏͜͝ͅ⚪̴̨̧̛̖̱̝̦͕̙̣͔̙͖̻̒̑̂͑̇͌ 

```

But when plex passes that name as `X-Plex-Device-Name`, other parts of the plex stack do not respect the server name/cannot handle it unsensitized.  
Plex Server should attempt to sanitize this value before saving it to a header if passing it to services that can’t handle UTF-16 properly (maybe python?).

Server Version#: 1.28.1.6018  
Player Version#: NA

Error as seen in logs:

```auto
[MetadataAgent/GuidExchange/tv.plex.agents.music] [HttpHeader] invalid 'X-Plex-Device-Name' header value (<ServerNameHere>)

```

I would upload logs, but this error blocks me from doing that: [Content no longer appearing in libraries; Download logs results in 500 internal error](https://forums.plex.tv/t/content-no-longer-appearing-in-libraries-download-logs-results-in-500-internal-error/440130)

Let me know if I can provide more information and I will, thanks.

Edit:

In my experience, this error causes:

- library updates (at least for music based libraries) to fail, resulting in music libraries that are perpetually out of date
- potentially errors downloading logs

Here is a log file pulled from the container, with an attempt at removing P I I.  
[redacted.log](https://forums.plex.tv/uploads/short-url/668hgnMLtsDA4V3rMNQnMb80i3v.log) (435.7 KB)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [November 11, 2022, 10:11pm UTC](https://forums.plex.tv/t/bug-allowed-server-names-throw-errors-in-logs-via-x-plex-device-name-header/804372/2 "2022-11-11T22:11:03Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
