jojoe77777 / FormAPI

Simple API for creating forms for MCPE clients (PocketMine only)
GNU Lesser General Public License v3.0
155 stars 120 forks source link

Response data validation #32

Closed SOF3 closed 2 years ago

SOF3 commented 6 years ago

FormAPI does not check if the response data are valid, e.g. whether a slider response exceeds the slider range.

sero583 commented 6 years ago

@SOF3 Who cares? It's the plugin's responsibility to do that...

SOF3 commented 6 years ago

Since it is something that should not normally happen, FormAPI has the responsibility to check it because it is some safety check that plugins normally should not and would not consider.

sero583 commented 6 years ago

@SOF3 Viewing at this point, I agreed. In my view plugin's should still be able to receive them if they want to do more complex things.

SOF3 commented 6 years ago

Only if the clients have a mod that allow exceeding valid value range...

sero583 commented 6 years ago

@SOF3 I don't think that anyone would develop a C++ mod just to exceed the range.

SOF3 commented 6 years ago

Then what is the "more complex things" you were talking about?

And if exceeding the range allows the user to exploit something in the server, someone will make that mod.

SOF3 commented 6 years ago

It doesn't even have to be a mod. It could simply be a bot sending invalid JSON packets directly.

sero583 commented 6 years ago

@SOF3 These points convinced me, this is not a urgent error but yes this has to be implemented.

Endermanbugzjfc commented 3 years ago

@SOF3 I don't think that anyone would develop a C++ mod just to exceed the range.

Lol maybe Horion client might have form element editor module in one future day.

Jviguy commented 3 years ago

me over here who already did this.

dktapps commented 2 years ago

Fixed by #61