by exevp · 5y ago · 0 comments
1) bypassing some timer in an API service requires the API to accept the string „Infinity“ and convert it to the JavaScript value Infinity - which is highly unlikely. Instead, the value would just fail the numeric validation.
2) bypassing some timer in client-side code by injecting Infinity seems overly complex - if you alter client-side code you might aswell just remove the validation instead of abusing edge cases of the language runtime.
Yeah, a more realistic bypass would be entering “3000000000”, which would trigger the same behavior.
Number(Infinity) -> Infinity
Infinity < 5000 -> will return false even though Infinity is acting as a 0 here