[SERVER-48064] two_phase_drops.js pendingDropRegex is not robust to similar names Created: 08/May/20 Updated: 29/Oct/23 Resolved: 12/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Judah Schvimer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Repl 2020-05-18 | ||||
| Participants: | |||||
| Linked BF Score: | 48 | ||||
| Description |
|
In this example, I would expect the "find" function to return the other collection.
|
| Comments |
| Comment by Githook User [ 12/May/20 ] | ||||||||||||||||||||
|
Author: {'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}Message: | ||||||||||||||||||||
| Comment by William Schultz (Inactive) [ 08/May/20 ] | ||||||||||||||||||||
|
I guess this is an escaping issue. It looks like "\." doesn't properly ensure any of the dot characters are treated literally:
Apparently you need a double backslash to escape literals when using the RegExp constructor (1, 2). Guess I missed this when I first wrote it |