diff options
Diffstat (limited to 'src/mongo/db/geo/geoquery.cpp')
-rw-r--r-- | src/mongo/db/geo/geoquery.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/geo/geoquery.cpp b/src/mongo/db/geo/geoquery.cpp index 024129cd01e..cc1c0b45309 100644 --- a/src/mongo/db/geo/geoquery.cpp +++ b/src/mongo/db/geo/geoquery.cpp @@ -68,6 +68,13 @@ namespace mongo { } } + // The user-provided point can be flat. We need to make sure that it's in bounds. + if (isNearSphere) { + uassert(17444, + "Legacy point is out of bounds for spherical query", + centroid.flatUpgradedToSphere || (SPHERE == centroid.crs)); + } + return hasGeometry; } |