PlayerInfo icon indicating copy to clipboard operation
PlayerInfo copied to clipboard

Validate the fields received by the client

Open inxomnyaa opened this issue 4 years ago • 0 comments

https://github.com/Matthww/PlayerInfo/blob/f3c9a9febb9d27fdcd46e04f4e830bc7e9bcda40/src/Matthww/PlayerInfo/PlayerInfo.php#L64-L68

A malformed client or a plugin like Specter (see issue https://github.com/falkirks/Specter/issues/85) could put incorrect data into the clientData fields, or a MCPE update could even suddenly change this with a new version, causing this plugin to crash.

According to Steadfast2 (not a trustworthy source imo), the "Unknown" "DeviceOS" field is -1 If this is true, it causes this plugin to crash.

Maybe default to "Unknown" if the data received is wrong/not in the arrays?

inxomnyaa avatar Apr 04 '20 23:04 inxomnyaa