Bigjango13 / MCPI-Addons

Addons to the MCPI api.
17 stars 5 forks source link

Update api.cpp #15

Closed Skjeggegubben closed 1 year ago

Skjeggegubben commented 1 year ago

Prevent 'denial of service'

Bigjango13 commented 1 year ago

This is great, but could you have it return whatever is returned for invalid input when not using MCPI-Addons?

Skjeggegubben commented 1 year ago

The internal API returns nothing on malformed or invalid input.. so do you think that is really the best way to have it?

Skjeggegubben commented 1 year ago

I did some more testing now and see there is inconsistency in the return from internal API, if just string with no dots and no parenthesis, then it actually does return string "Fail", but in all other cases it seems to just return "" i.e. an empty string. I'll see if I can make it return "Fail", which I think is better than just empty string return at least.