Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11582

$uniqueDocs validation does not error with "uniquedocs" or "$uniquedocs" tag names.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.5.4
    • Component/s: Querying
    • Labels:
    • Environment:
    • Operating System:
      ALL

      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 } } }  )

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: