[SERVER-6592] improve FieldPath validation behavior Created: 25/Jul/12  Updated: 28/Oct/15  Resolved: 26/Jul/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 2.2.0-rc1

Type: Improvement Priority: Major - P3
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-8436 Aggregation pipeline cannot process s... Backlog
Participants:

 Description   

See comments.



 Comments   
Comment by Aaron Staple [ 26/Jul/12 ]

Documentation should describe characteristics of valid field paths. FieldPaths are validated as follows:

uassert(15998, "FieldPath field names may not be empty strings.", fieldName.length() > 0);
uassert(16410, "FieldPath field names may not start with '$'.", fieldName[0] != '$');
uassert(16411, "FieldPath field names may not contain '\0'.",
fieldName.find('\0') == string::npos);
uassert(16412, "FieldPath field names may not contain '.'.",
!str::contains(fieldName, '.'));

Comment by auto [ 26/Jul/12 ]

Author:

{u'date': u'2012-07-26T00:04:46-07:00', u'email': u'aaron@10gen.com', u'name': u'Aaron'}

Message: SERVER-6592 Improve FieldPath's validation and simplify its invariants.
Branch: master
https://github.com/mongodb/mongo/commit/6580d32cc4d0792034e470e851a09ade5fd252a9

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