Skip to content

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
jackwener:mainfrom
yisiliu:fix/xiaohongshu-xsec-source
Closed

fix(xiaohongshu): emit xsec_source=pc_share instead of an empty value in signed note URLs#2474
yisiliu wants to merge 1 commit into
jackwener:mainfrom
yisiliu:fix/xiaohongshu-xsec-source

Conversation

@yisiliu

@yisiliu yisiliu commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

buildFeedNoteUrl (shared with the rednote adapter) and ask's citation URL builder emitted xsec_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 sets pc_share (the generic web share context), consistent with the pc_user label the profile-context builders in this adapter already use.

Two call sites fixed (feed.js, ask.js); the elsewhere-correct pc_user sites are untouched. Test expectations updated (feed/ask/rednote suites — 364 adapter tests green, full suite 7316, gates clean). Verified live: feed URLs now carry xsec_source=pc_share and drill-down via xiaohongshu note on those URLs keeps working.

Part of the xiaohongshu arc: #2470.

🤖 Generated with Claude Code

… 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>
@yisiliu

yisiliu commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #2461 (which already touches both files) to keep the PR count down — closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant