[SERVER-7690] a filter string in the REST interface cannot start with nan Created: 16/Nov/12  Updated: 07/Jul/17  Resolved: 07/Jul/17

Status: Closed
Project: Core Server
Component/s: HTTP Console
Affects Version/s: 2.2.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Pablo Raffo Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: REST, nan, platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX, Linux


Operating System: ALL
Steps To Reproduce:

Query the REST interface like this: http://localhost:28017/bie/user/?filter_email=nan@yahoo.com#

No data or collections are needed to reproduce the error.

Participants:

 Description   

when the filter string starts with nan the REST interface throws an error:

Query: http://localhost:28017/bie/user/?filter_email=nan@yahoo.com#

in 2.0.2: error loading page: Number nan cannot be represented in JSON

in 2.2.1:

{
"offset" : 0,
"rows": [

],

"total_rows" : 0 ,
"query" :

{ "email" : NaN }

,

Error: Parse error on line 8:
...uery" :

{ "email" : NaN }

, "millis" :
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['


Generated at Thu Feb 08 03:15:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.