fix(xiaohongshu): emit xsec_source=pc_share instead of an empty value in signed note URLs - #2474
Closed
yisiliu wants to merge 1 commit into
Closed
fix(xiaohongshu): emit xsec_source=pc_share instead of an empty value in signed note URLs#2474yisiliu wants to merge 1 commit into
yisiliu wants to merge 1 commit into
Conversation
… in signed note URLs buildFeedNoteUrl (shared with rednote) and ask's citation URL builder set xsec_source to an empty string, on the theory that it mirrored the site's own feed links and the value was not validated. An empty source is an anomalous shape no official surface produces and interacts badly with token validation / risk control; label the context explicitly as pc_share, consistent with the pc_user label the profile-context builders in this adapter already use. Verified live: feed URLs now carry xsec_source=pc_share and drill-down via `xiaohongshu note` on those URLs keeps working. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Folded into #2461 (which already touches both files) to keep the PR count down — closing. |
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.
buildFeedNoteUrl(shared with the rednote adapter) andask's citation URL builder emittedxsec_source=with an empty value, on the in-code theory that it mirrored the site's own feed links and that the value was not validated. An empty source is an anomalous shape no official surface produces and interacts badly with token validation / risk control — the signed-URL context should be labeled explicitly. This setspc_share(the generic web share context), consistent with thepc_userlabel the profile-context builders in this adapter already use.Two call sites fixed (
feed.js,ask.js); the elsewhere-correctpc_usersites are untouched. Test expectations updated (feed/ask/rednote suites — 364 adapter tests green, full suite 7316, gates clean). Verified live: feed URLs now carryxsec_source=pc_shareand drill-down viaxiaohongshu noteon those URLs keeps working.Part of the xiaohongshu arc: #2470.
🤖 Generated with Claude Code