You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Potential internal cross-references confuses the gc, preventing heap structures from being correctly dismissed and recycled. Actually the OnResult reference within the template cached structure is the cause of the issue, partially mitigated by purging the cache within a specific use paradigm. The issue potentially remains and go unnoticed with future changes.
Ref #4836
Expected Behavior:
The cache should be restructured as follows:
Common cache between parsers and templates package, unless there is a specific reason for redundancy
Purgeable unique global cache containing only a generic and common template representation (no executor options, no external pointer references)
During execution, requests are "compiled" in their final form, which is scoped for the process duration, and should return reference-free structures (there shouldn't be reason for a Result object to hold references to internal structures, as mostly only string and maps of strings are involved)
The text was updated successfully, but these errors were encountered:
Mzack9999
added
the
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
label
Mar 11, 2024
cache in parsers is used for initial loading of template with purpose of filtering them using TagFilters, hence all templates available are loaded and cached here to allow loading using different loading options
cache in templates contains compiled + valid templates that are actually loaded and will be used. the only requirement for this cache is because of workflow templates where we allow loading templates via tags
Mzack9999
changed the title
Propsal of internal cache refactor
Proposal of internal cache refactor
Mar 12, 2024
Nuclei version:
main|dev
Current Behavior:
Potential internal cross-references confuses the
gc
, preventing heap structures from being correctly dismissed and recycled. Actually theOnResult
reference within the template cached structure is the cause of the issue, partially mitigated by purging the cache within a specific use paradigm. The issue potentially remains and go unnoticed with future changes.Ref #4836
Expected Behavior:
The cache should be restructured as follows:
Result
object to hold references to internal structures, as mostly only string and maps of strings are involved)The text was updated successfully, but these errors were encountered: