Skip to content

添加静态文件 授信host 功能 防止XSS#744

Closed
gaoxingzaq wants to merge 2 commits intokekingcn:masterfrom
gaoxingzaq:host
Closed

添加静态文件 授信host 功能 防止XSS#744
gaoxingzaq wants to merge 2 commits intokekingcn:masterfrom
gaoxingzaq:host

Conversation

@gaoxingzaq
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@klboke klboke left a comment

Choose a reason for hiding this comment

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

发现 3 个会直接影响现有预览能力的 blocker:

  1. cadviewer 相关静态 HTML 被删除后,空间对象面板会直接 404。这个 PR 删除了 server/src/main/resources/static/cadviewer/app/cv/cv-pro/space/html/nav_admin_SpaceObjects_B_1_05.htmlnav_admin_SpaceObjects_C_1_06.htmlnav_user_SpaceObjects_A_3_3_01.html 等文件,但 server/src/main/resources/static/cadviewer/app/cv/cv-pro/cadviewer.min.js:31281:31613:48343 仍然在运行时通过 .load(...) 请求这些路径。结果不是“少几个 demo 文件”,而是 CADViewer 的空间对象/admin 面板会在点击时直接失败。

  2. xmind 预览的新 srcdoc 页面引用了仓库里不存在的 jQuery 路径。server/src/main/resources/static/xmind/xmind.js:21 现在写的是 js/jquery.min.js,但仓库里实际存在的是 server/src/main/resources/static/js/jquery-3.6.1.min.js,并没有 jquery.min.js。与此同时这个 PR 还删除了原本可工作的 server/src/main/resources/static/xmind/index.html,所以 XMind 预览会改走这条新路径并在 iframe 内拿到 404,导致预览初始化失败。

  3. OFD 页码跳转和移动端按宽度适配回归了。server/src/main/resources/web/ofd.ftl:141-161 不再通过 ?page= / ?scale=width 进入 cnofd-view.js 既有流程,而是只保存了一个本地变量 pageNum 后手动调用 kkPage()。但 server/src/main/resources/static/ofd/js/cnofd-view.js:8-12:19-20:32 依赖的是 window.pagewindow.location.search 里的 page/scale 参数;现在 pageNum 没有写回 page,所以指定页跳转不会生效,移动端原来的 scale=width 也丢了。这个改动会把既有的深链和手机预览体验一起打坏。

这三个问题都属于发布前需要先修掉的回归。

@gaoxingzaq gaoxingzaq closed this Apr 15, 2026
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.

2 participants