[SERVER-72493] mongo crashes if jsconfig.json exists but has no compilerOptions.baseUrl field Created: 03/Jan/23 Updated: 29/Oct/23 Resolved: 04/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sophia Tan | Assignee: | Matt Broadstone |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Server Serverless 2023-01-09 |
| Participants: |
| Description |
|
If `jsconfig.json` exists but has no compilerOptions.baseUrl field, the mono shell will crash when try to read string value for the baseUrl from null/undefined. |
| Comments |
| Comment by Githook User [ 04/Jan/23 ] |
|
Author: {'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}Message: |
| Comment by Matt Broadstone [ 03/Jan/23 ] |
|
A little more context here. The line which tries to access the compilerOptions.baseUrl property mistakenly assumes the result of JS_GetProperty ensures the value was read (and is not undefined or null). The fix must ensure the value is a string. |