[GODRIVER-887] Panic when passing in UploadOptions with Metadata but no Registry to bucket.OpenUploadStream Created: 18/Mar/19 Updated: 28/Oct/23 Resolved: 19/Mar/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | GridFS |
| Affects Version/s: | 1.0.0 |
| Fix Version/s: | 1.0.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Freed | Assignee: | Patrick Freed |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Passing in an UploadOptions specifying Metadata but not Registry to bucket.OpenUploadStream causes the driver to panic due to a nil pointer dereference. This is due to the options.GridFSUpload constructor not setting the default registry as the docstring suggests, and the lack of a nil check in parseUploadOptions, where the panic actually occurs. |
| Comments |
| Comment by Githook User [ 19/Mar/19 ] |
|
Author: {'email': 'patrick.freed@mongodb.com', 'name': 'Patrick Freed', 'username': 'patrickfreed'}Message: |