Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate the fields received by the client #16

Open
inxomnyaa opened this issue Apr 4, 2020 · 0 comments
Open

Validate the fields received by the client #16

inxomnyaa opened this issue Apr 4, 2020 · 0 comments

Comments

@inxomnyaa
Copy link

$os[$cdata["DeviceOS"]],
$player->getAddress(),
$UI[$cdata["UIProfile"]],
$GUI[$cdata["GuiScale"]],
$Controls[$cdata["CurrentInputMode"]]

A malformed client or a plugin like Specter (see issue falkirks/Specter#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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant