[SERVER-25030] end-of-string anchor matches null character in regex Created: 13/Jul/16  Updated: 14/Jul/16  Resolved: 13/Jul/16

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.6.10
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Martijn Otto Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-18824 Support matching text that has embedd... Closed
Operating System: ALL
Steps To Reproduce:

db.test.insert(

{ _id : 'test\0' }

);
db.test.find(

{ _id: /^test$/ }

);

Participants:

 Description   

The end-of-string anchor ($) matches a null character where it shouldn't.



 Comments   
Comment by Ramon Fernandez Marina [ 13/Jul/16 ]

Thanks for your reporter martijntje, this bug has already been fixed in SERVER-18824, so I'm going to mark this ticket as a duplicate.

The fix is only present in the development release 3.3.2 and newer. A backport to the 3.2 branch is being evaluated. Feel free to watch SERVER-18824 for any updates on that front.

Regards,
Ramón.

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