-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strings which are only numbers causes issues. #223
Comments
This fixes a number of subtle bugs and restricts "sloppy" argument coercion (e.g. 'true' to the bool true) to string-only HTTP datasources like querystrings and headers. Fixes strongloop#223 (coerced Number past MAX_SAFE_INTEGER) Possible fix for strongloop#208
This fixes a number of subtle bugs and restricts "sloppy" argument coercion (e.g. 'true' to the bool true) to string-only HTTP datasources like querystrings and headers. Fixes strongloop#223 (coerced Number past MAX_SAFE_INTEGER) Possible fix for strongloop#208
This fixes a number of subtle bugs and restricts "sloppy" argument coercion (e.g. 'true' to the bool true) to string-only HTTP datasources like querystrings and headers. Fixes strongloop#223 (coerced Number past MAX_SAFE_INTEGER) Possible fix for strongloop#208
Hello @nareshjois, I am writing an extensive test suite in #304 to capture the current behaviour of our coercion algorithm in different edge cases. I have difficulties reproducing your problem, could you please help me by providing more information? AFAICT, in the current strong-remoting version: when you specify:
and POST a request with JSON body { "data" : { "customerId" : "2343546576878989879789" } } then no coercion is applied and the input ("accepts") argument is set to { "data" : { "customerId" : "2343546576878989879789" } } The same applies when the input argument specified { "customerId" : "2343546576878989879789" } What am I missing? Is it possible that this issue has been already fixed in v2.16.1 by 34b0665? /cc @STRML |
Closing as fixed. |
say a request is just
{ "data" : { "customerId" : "2343546576878989879789" } }
The Coerce function is over enthusiastic and parses the customerId to
234354657687898987
to234354657687898980
, this leads to incorrect values being passed around, Either the Regex test for isFloat needs to be corrected to handle numbers which javascript is good with or strings need not be parsed to floats as a whole.The text was updated successfully, but these errors were encountered: