We have a business rule that sends out an email when a node is created. When creating a node using JSONAPI the token replacements cause a HTTP 500 error due to the leaked metadata.

Patch forthcoming.

Comments

Matthijs created an issue. See original summary.

matthijs’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.18 KB

There might be a better fix, but this one works in our case.

matthijs’s picture

Title: Token replacements lead to leaked meta data » Token replacements lead to leaked metadata
c.e.a’s picture

Priority: Normal » Major

This issue has been added to #3041221: List of all 'Bug reports' that need immediate support Assigned to: yseki

c.e.a’s picture

Assigned: Unassigned » yseki
c.e.a’s picture

Assigned: yseki » Unassigned
Status: Needs review » Patch (to be ported)
c.e.a’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
colan’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.2 KB
new2.76 KB

How's this?

  • Removed duplicate code.
  • Placed object instantiation in-line.
colan’s picture

Status: Needs review » Postponed (maintainer needs more info)
colan’s picture

Issue tags: +Performance
daften’s picture

Rerolled patch for 3.x

The problem is in certain situations, e.g. when sending out email, there was an error as the title described: `The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Ensure you are not rendering content too early`

daften’s picture

StatusFileSize
new2.31 KB

With working patch now

rcodina’s picture

Version: 8.x-1.x-dev » 3.x-dev
rcodina’s picture

Status: Postponed (maintainer needs more info) » Needs review