[SERVER-5697] Unmatched quotes in regular expression cause JS shell to enter multi-line mode Created: 24/Apr/12 Updated: 11/Jul/16 Resolved: 18/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.1.0 |
| Fix Version/s: | 2.5.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Barrie Segal | Assignee: | Tad Marshall |
| Resolution: | Done | Votes: | 1 |
| Labels: | neweng, regex, shell | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
To reproduce: (in the JS shell) ) A question regarding this was asked on Google Groups: http://groups.google.com/group/mongodb-user/browse_thread/thread/fcd29bf712e49e13 |
| Comments |
| Comment by Tad Marshall [ 18/Mar/13 ] |
|
There was never any reason to enter multi-line mode on an unterminated string, since all you'll get is a syntax error from the JavaScript engine, so the case described here is fixed by the above commit. There are still potential issues related to not having code that understands regular expressions in the isBalanced() routine, so there will perhaps be other cases related to parentheses, braces, brackets and single and double quotes in regex expressions (e.g. /regex/), but we can leave that to another ticket. The case described here is fixed. |
| Comment by auto [ 18/Mar/13 ] |
|
Author: {u'date': u'2013-03-17T11:22:29Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: When skipping quoted strings in isBalanced(), skip past quotes |