[SERVER-11582] $uniqueDocs validation does not error with "uniquedocs" or "$uniquedocs" tag names. Created: 05/Nov/13  Updated: 10/Mar/14  Resolved: 08/Nov/13

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.4.5
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: Alvin Richards (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: 26qa, nqf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

> db.serverBuildInfo()
{
"version" : "2.5.4-pre-",
"gitVersion" : "83e056702108e7693e58886a8364aaa036eb6edd",
"OpenSSLVersion" : "",
"sysInfo" : "Darwin vero 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
"loaderFlags" : "-fPIC -pthread -Wl,-bind_at_load -mmacosx-version-min=10.6",
"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wno-unknown-pragmas -Winvalid-pch -pipe -O3 -Wno-unused-function -Wno-deprecated-declarations -mmacosx-version-min=10.6",
"allocator" : "tcmalloc",
"versionArray" : [
2,
5,
4,
-100
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}


Issue Links:
Related
Operating System: ALL
Participants:

 Description   

Problem:
The validation for the $geoWithin allows enormous values to be passed into the query without throwing an error.

Reproduce:

2.4.5

db.q.drop()
db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , uniquedocs : false } } }  )
db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniquedocs : false } } }  )
db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniqueDocs : false } } }  )

No error pr documents are returned.

2.5.4-Pre

db.q.drop()
db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , uniquedocs : false } } }  )
error: { "$err" : "bad query: BadValue bad geo query", "code" : 16810 }
 
db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniquedocs : false } } }  )
error: { "$err" : "bad query: BadValue bad geo query", "code" : 16810 }
 
db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniqueDocs : false } } }  )



 Comments   
Comment by Daniel Pasette (Inactive) [ 08/Nov/13 ]

alvin, do you think there's more that needs to be addressed than documentation?

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