[SERVER-28121] DurableViewCatalog shouldn't throw on null byte in view ns Created: 27/Feb/17  Updated: 05/Apr/17  Resolved: 13/Mar/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.4.4, 3.5.5

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: James Wahlin
Resolution: Done Votes: 0
Labels: read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-28271 invalid_system_views.js test cases ma... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Steps To Reproduce:

> db.createCollection("coll")
{ "ok" : 1 }
> db.system.views.insert({_id: "\0"})
WriteResult({ "nInserted" : 1 })
> db.getCollectionInfos()
2017-02-27T11:46:56.558-0500 E QUERY    [main] Error: listCollections failed: {
	"ok" : 0,
	"errmsg" : "namespaces cannot have embedded null characters",
	"code" : 73,
	"codeName" : "InvalidNamespace"
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype._getCollectionInfosCommand@src/mongo/shell/db.js:805:1
DB.prototype.getCollectionInfos@src/mongo/shell/db.js:817:19
@(shell):1:1

Sprint: Query 2017-03-27
Participants:
Linked BF Score: 0

 Description   

Inserting a null byte into a system.views namespace is allowed but should cause operations against that view to fail with InvalidViewDefinition. It should also not prevent mongod startup, which is the case here.



 Comments   
Comment by Githook User [ 28/Mar/17 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-28121 DurableViewCatalog shouldn't throw on null byte in view ns

(cherry picked from commit ba3db7220399aedbb871aa8a18d325a877c30d53)
Branch: v3.4
https://github.com/mongodb/mongo/commit/8874782785aa177e71fbf86ace6bd533705e7ad7

Comment by Githook User [ 13/Mar/17 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-28121 DurableViewCatalog shouldn't throw on null byte in view ns
Branch: master
https://github.com/mongodb/mongo/commit/ba3db7220399aedbb871aa8a18d325a877c30d53

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