AI-on-the-edge-device icon indicating copy to clipboard operation
AI-on-the-edge-device copied to clipboard

Input sanitization missing for config "Decimal Shift"

Open torwag opened this issue 2 years ago • 1 comments

The config to shift the decimal point (Decimal Shift) after recognition of all digits, expects the number of digits to move the decimal point. E.g. 1376 l are 1.376 m3 thus -3 digits.

Obvious my overtired engineer brain did what it always does and divided by 1000 and as this, I entered 1000 into that field.

As a side effect that seems to expose a missing input sanitization. The ESP simply silently crashes. It might be a good idea to limit inputs between -9 and 9 as everything else seems rather unlikely.

Originally posted by @torwag in https://github.com/jomjol/AI-on-the-edge-device/discussions/2340#discussioncomment-5702989

torwag avatar Apr 24 '23 01:04 torwag

this is an issue we have with almost any input parameters

caco3 avatar Apr 27 '23 05:04 caco3