Fix script tag validation with JWT signed fields#375
Open
rishab-intercom wants to merge 1 commit intomasterfrom
Open
Fix script tag validation with JWT signed fields#375rishab-intercom wants to merge 1 commit intomasterfrom
rishab-intercom wants to merge 1 commit intomasterfrom
Conversation
…fields When both user_id and email are configured as signed_user_fields, they are deleted from user_details during JWT promotion. The valid? check then finds neither field and silently suppresses the script tag. Fix by capturing identity presence before the fields are moved to the JWT payload. Related to intercom/intercom#430057 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
When both
user_idandemailare configured assigned_user_fields, they get deleted from theuser_detailshash during JWT promotion. Thevalid?method then checks that same (now-empty) hash, returnsfalse, and the script tag is silently hidden from views.How?
Capture identity presence (
user_idoremail) before JWT signing deletes the fields, then use the cached boolean invalid?. Two-line production change, zero interface changes.Generated with Claude Code