Skip to content

feat: prefer independent plugin project URLs - #692

Draft
OneBigMoon wants to merge 1 commit into
jxxghp:v2from
OneBigMoon:codex/plugin-project-url
Draft

feat: prefer independent plugin project URLs#692
OneBigMoon wants to merge 1 commit into
jxxghp:v2from
OneBigMoon:codex/plugin-project-url

Conversation

@OneBigMoon

@OneBigMoon OneBigMoon commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • prefer project_url for installed plugin, marketplace card, and marketplace detail homepage actions
  • retain repository and author URL fallbacks for older plugin metadata
  • open already-known project URLs synchronously to avoid an about:blank tab

Verification

  • 33 targeted Vitest tests passed
  • vue-tsc --noEmit passed
  • ESLint passed for all changed files
  • production Vite/PWA build passed

PR-Agent 摘要

🤖 Generated by PR Agent at a4d1684

  • 新增插件 project_url 元数据字段
  • 项目主页优先使用声明地址
  • 保留仓库与作者主页回退
  • 覆盖卡片与市场详情跳转测试

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PR-Agent Code Review

此 PR 新增并优先使用插件声明的项目主页,同时保留安装来源和作者主页回退。直接打开已知项目地址的路径绕过了原有的窗口隔离措施,会引入可达的反向标签劫持风险。

审查提交:a4d1684


// 访问插件项目主页
async function visitPluginPage() {
const projectUrl = normalizePluginRepoUrl(props.plugin?.project_url)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Opener 泄露

当插件声明的 project_url 指向恶意外部页面且用户点击“项目主页”时,直接调用 window.open 会让新页面保留对当前应用窗口的 opener 引用,从而可能将原标签重定向到钓鱼页面。该函数原有的异步分支会显式清除 popup.opener;项目地址的同步打开分支也必须维持相同的窗口隔离约束,无需改变后续的地址回退逻辑。

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