[SERVER-68920] Haystack geoSearch accepts NaN for 'limit' and 'maxDistance' Created: 17/Aug/22 Updated: 05/Dec/22 Resolved: 18/Aug/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.16, 4.2.22 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | Backlog - Query Optimization |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
The geoSearch command (GeoHaystackSearchCommand) uses the unsafe numberInt() method for the 'limit' and 'maxDistance' arguments. This means passing NaN will have different behavior on different platforms. limit NaN:
maxDistance NaN:
Ideally the parser should reject this argument since it doesn't make sense. |
| Comments |
| Comment by Joe Kanaan [ 18/Aug/22 ] |
|
Behavior with NaN is not defined. |