d8ahazard / FlexTV

Other
213 stars 32 forks source link

Security issue using shared X-Plex-Client-Identifier header #17

Open JonnyWong16 opened 5 years ago

JonnyWong16 commented 5 years ago

IMPORANT, PLEASE READ FIRST:

Please read over the Notes/FAQ and networking sections before reporting an issue.

If your issue is not resolved, try to fill out the following as completely as possible. I'm not going to delete issues just because forms aren't filled out completely, but I will if you provide me no information whatsoever.

If submitting a feature request, these are not required.

1. Are you hosting your own version of Flex TV, or using the one at https://app.phlexchat.com?

Hosted on https://app.phlexchat.com.

If hosting your own version, please answer the below questions. Otherwise, proceed to #8.

2. On what OS are you running Flex TV?

3. Are you using a new instance of XAMPP, or an existing webserver?

3b. If not XAMPP, what WebServer stack are you using?

4. Have you enabled the sockets module and ensured PHP has write-access to the directory containing Flex TV?

5. Have you followed the (networking)[Talking-To-The-Outside-World] section?

6. If you're having issues with a specific command, please note the timestamp in the web UI, and take a look at Flex TV and Flex TV_error.log files. Paste anything that looks related as well.

BE SURE TO CHANGE ANY LINES CONTAINING API TOKENS OR OTHER PERSONAL IDENTIFYING INFORMATION

7. What are the last six digits of your server's API Token? (Settings -> Flex TV)

8. Please describe the issue.

FlexTV is using the string foo as the X-Plex-Client-Identifier header value.

https://github.com/d8ahazard/FlexTV/blob/7c124259388b8b0a04ebff786c48c2f42179c0a2/php/webApp.php#L655

This is a security issue since all FlexTV users are sharing the same identifier. It may potentially allow one use to retrieve the token of another user. The client identifier should be a uuid that is unique to each client.

https://stackoverflow.com/a/2040279