Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flows/openai/content/plus-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,9 @@ function findHostedCheckoutUrl(payload = {}) {

async function createPlusCheckoutSession(options = {}) {
await waitForDocumentComplete();
if (location.origin !== 'https://chatgpt.com') {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该校验在 PR 所述的同源 XSS 场景中始终通过,因此不能作为 CSRF/XSS 防护边界。请先明确真实攻击入口,再在可验证的消息或权限边界修复,并补对应回归测试。

throw new Error('付款操作只允许在 chatgpt.com 域名下执行。');
}
log('Plus:正在读取 ChatGPT 登录会话...');

const sessionResponse = await fetch('/api/auth/session', {
Expand Down