[SERVER-42201] MR cluster command does not validate collection namespace Created: 12/Jul/19  Updated: 29/Oct/23  Resolved: 17/Jul/19

Status: Closed
Project: Core Server
Component/s: MapReduce
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Bug Priority: Minor - P4
Reporter: Xin Hao Zhang (Inactive) Assignee: Xin Hao Zhang (Inactive)
Resolution: Fixed Votes: 0
Labels: query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-41938 Refactor mapReduce command in support... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

On mongos, run mapReduce on an invalid collection name.

 

db.runCommand({ 
   mapReduce: /test/, 
   map: map, 
   reduce: reduce, 
   out: {inline: 1}
});

 

 

Sprint: Query 2019-07-15, Query 2019-07-29
Participants:
Linked BF Score: 19

 Description   

A refactor for the cluster mapReduce by SERVER-41938 fails to validate the collection namespace on sharded clusters, which must be a string. Specifically the previous implementation uses parseNsCollectionRequired while the recent change uses parseNsFromCommand which skips some validations.



 Comments   
Comment by Githook User [ 17/Jul/19 ]

Author:

{'name': 'Xin Hao Zhang', 'username': 'xinhaoz', 'email': 'xinhao.zhang@mongodb.com'}

Message: SERVER-42201 Fix namespace validation for MR cluster command
Branch: master
https://github.com/mongodb/mongo/commit/37874e227afea1d7717ac4809b2a0bcfe640a255

Generated at Thu Feb 08 04:59:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.