Fixed
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Brad Wood
Brad WoodPriority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Affects versions
Created 15 March 2022 at 21:56
Updated 21 March 2022 at 10:38
Resolved 21 March 2022 at 10:38
Due to the fix here:
https://github.com/Ortus-Solutions/Lucee/commit/a3d8c6109472da47a4e1444cd4eacd676f5e3194
The code was refactored in such a way that it throws an NPE when a content type is set that Lucee does not recognize.
This code will reproduce the error on Lucee 5.3.9.108
The error is
The bad line of code is
which was recently changed. The problem is the isTextMimeType() method was recently changed to return a `Boolean` class instance instead of a `boolean` primitive (lowercase). Primitives can't be null, but class instances can. So the new code path that was added added to return a null gives us an NPE when we check the value of it. If Lucee is going to return a Boolean type from that method and sometimes that return will be null, every place that checks the return value of that method needs to check for null AS WELL AS a boolean value.