Fixed
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Imported User 63
Imported User 63Priority
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 19 February 2015 at 01:41
Updated 8 June 2021 at 14:25
Resolved 19 January 2017 at 14:32
Calling serializeJSON(entity) on a loaded ORM entity with relationships will send the server in to panic with 100% CPU usage of all available cores.
The ACF implementation of this uses toString() recursively on variables and will not recurse to lazy=true relationships.
While the bug was discovered by a mistake on my part (I have since sanitized the data prior to serialization), a graceful Exception strategy, or better yet, a simple recursion strategy should be implemented to allow for conditional conversion of ORM objects.
Notes:
Tested as unrecoverable on a server with 2GB of memory, but recoverable on a server with greater than 8.
The test entity contained injected non-persistent object and config struct properties as well. I am attaching an ACF JSON serialization of the entity for reference