[SERVER-18167] handle BSON validation in OP_COMMAND/OP_COMMANDREPLY Created: 22/Apr/15  Updated: 23/Aug/16  Resolved: 17/Jun/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.1.5

Type: Task Priority: Major - P3
Reporter: Adam Midvidy Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-25701 Invalid query triggers stack trace Closed
is related to SERVER-20665 RegExp with \u0x0000 triggers stack t... Closed
Backwards Compatibility: Fully Compatible
Sprint: Platform 4 06/05/15, Platform 5 06/26/16
Participants:

 Description   

We currently ignore serverGlobalParams.objcheck. We are going to defer this work for a bit until we figure out how the integration will look.

Idea:: make a new DataType<Validated<T>> or similar that we would use in the DataRangeCursor.



 Comments   
Comment by Githook User [ 18/Jun/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-18167 fix unused variable
Branch: master
https://github.com/mongodb/mongo/commit/4207a940b93dfc5f03ae23c9195fc2251104860c

Comment by Githook User [ 17/Jun/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-18167 handle BSON Validation in OP_COMMAND
Branch: master
https://github.com/mongodb/mongo/commit/3adb7b4cfd51e7519298bdb6a9a857ebb4904941

Comment by Adam Midvidy [ 20/May/15 ]

We have the tools in place for this now. The issue is working out the library dependencies. At some point we need to read serverGlobalParams.objcheck and branch. The question is - where?

serverGlobalParams currently is part of 'server_options_core'

Places we can do it - low level to high level
1) in the bson library (would create a circular dependency, merely listing here for completeness)
2) in the 'net' library <- already has dependency on 'server_options_core'
3) in the 'rpc' library
4) in the 'clientdriver' library
5) in the 'coredb' library in mongod, or 'cluster_ops' library of mongos
6) .. even lower level

The server_options_core dependency is already quite low, but acm has mentioned that this is undesirable, so we do not want to make it harder to remove. Having a higher level dependency on server_options has the benefit of reducing library entanglement, at the cost of having to potentially thread the parameter through many layers of the codebase. I'm interested to hear your thoughts acm and schwerin.

There are other things we can do like moving the state from server_options to service_context, but that seems like just switching from one highly entangled global variable to another.

Comment by Githook User [ 18/May/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-18167 add method for validating input/output to a DataRange
Branch: master
https://github.com/mongodb/mongo/commit/43dedc33efa736e91d3389d9a972c93fef78e06a

Generated at Thu Feb 08 03:46:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.