[SERVER-12642] distinct command should validate input Created: 06/Feb/14 Updated: 03/Jul/14 Resolved: 17/Jun/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Querying, Shell |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.3 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Esha Maharishi (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Minor Change |
| Participants: |
| Description |
|
Currently if you mistakenly send a non-string as the key field no error is generated. Both the command and shell helper should be checking this.
The command turns this into the key spec {"":1} because of "cmdObj["key"].valuestrsafe();" returning "" for non strings. In both places we just need to make sure the arg is a string, or error. Likewise the query option should also be validated since anything other than embedded doc will result in the value being ignored and replaced by the empty query/doc. |
| Comments |
| Comment by Githook User [ 17/Jun/14 ] |
|
Author: {u'username': u'EshaMaharishi', u'name': u'eshamaharishi', u'email': u'em2852@columbia.edu'}Message: Signed-off-by: Matt Kangas <matt.kangas@mongodb.com> |
| Comment by Githook User [ 17/Jun/14 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " |
| Comment by Githook User [ 17/Jun/14 ] |
|
Author: {u'username': u'EshaMaharishi', u'name': u'eshamaharishi', u'email': u'em2852@columbia.edu'}Message: Signed-off-by: Benety Goh <benety@mongodb.com> |