crisischeckin icon indicating copy to clipboard operation
crisischeckin copied to clipboard

Quantity field not validated for values in range

Open miketull opened this issue 8 years ago • 4 comments

P1, virtual

-1 was accepted as a valid Quantity value. And 1 billion (1000000000) was accepted as a valid value. There should be some range-checking on the field.

miketull avatar May 05 '16 21:05 miketull

Note: the maximum value it allows is 2147483647 (2^31 - 1), and the smallest is -2147483648. Looks like it's just catching an exception when it overflows a 32-bit signed integer. Outside that range, the error is "The value '-2147483649' is not valid for Quantity.".

swalchemist avatar May 10 '16 00:05 swalchemist

I think what @miketull is saying is that the actual ranges for validation make no sense, not that there is no validation being done...

mjmilan avatar May 10 '16 16:05 mjmilan

@mjmilan, I agree, a smaller range would make more sense.

swalchemist avatar May 10 '16 16:05 swalchemist

@mjmilan is correct. My intention was to communicate that the allowed range of values didn't make sense.

miketull avatar May 10 '16 18:05 miketull