Skip to content

Commit 28a2e6a

Browse files
chaxusclaude
andcommitted
fix(license): restore the ONLYOFFICE product logo and add the notices AGPL Section 7 requires
The vendor's AGPL-3.0 headers carry two additional terms under Section 7: 7(b) requires a derivative work to retain the original product logo, and 7(e) declines to grant any rights under trademark law. This build honoured neither. guards/chrome.ts hid `#header-logo` and the DocEditor config set `customization.about: false`, which between them left no product mark anywhere in the interface, and no trademark notice existed in the repository or on the site. Both removals were deliberate UI tidy-ups, so a comment would not have held: - guards/chrome.ts keeps hiding the current-user and co-users widgets (a collaboration session a serverless build cannot have) and nothing else. - `customization.about` goes back to its default. The vendor's own `canBrandingExt` check exists to force it back on; this offline build just does not enforce it. - New guard 12 (guards/about-source.ts) appends this build's own two facts to the About pane -- that it is a modified version and not an official ONLYOFFICE product, and where its source is (Section 13). The pane is populated lazily, so it watches for the content rather than writing once. - NOTICE quotes the terms verbatim, pins the vendor version, and lists every change made to the vendor tree (Section 5(a)). - The eight readmes point at it; all seven site languages carry a trademark line in both footers. Pinned by test/unit/branding-notice.test.ts and test/e2e/vendor-branding.spec.ts. Reverse-verified twice: restoring the two suppressions turns the three editor cases red, and dropping the footer notice turns the three page cases red. Also in passing: /zh/ used to 404 (the real prefix is the BCP-47 /zh-CN/), and the embed docs never said prominently that `document:open-url` and `?src=` need CORS on the file's own host. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 22d7518 commit 28a2e6a

26 files changed

Lines changed: 712 additions & 15 deletions

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ notes. Entries describe what users experience, not internal refactors.
4444
the session on them, so a laptop keeps a recovery point about every 30
4545
seconds while a phone under load backs off instead of competing with the
4646
document you are editing.
47+
- **The ONLYOFFICE logo is back in the editor header, and the About pane with
48+
it.** Both had been switched off as interface clutter. They are not: this
49+
editor is a modified version of ONLYOFFICE, and the license it is published
50+
under requires the product logo to stay. The About pane now also says that
51+
this build is not an official ONLYOFFICE product and links to the source it
52+
was built from. Every page of the site carries the same trademark notice in
53+
its footer, and the repository has a NOTICE file with the full terms and the
54+
list of changes made to the vendor build.
4755

4856
### Known issues
4957

CLAUDE.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,12 @@ lib/ # 应用层(纯 TypeScript,只在本站点用)
6363
loading.ts # 加载状态 UI
6464
onlyoffice-editor.ts # 编辑器生命周期门面:挂载/重建/loadEditorApi,并对外统一导出下面这些模块
6565
onlyoffice/ # 编辑器周边(2026-08-19 从 1975 行的单文件拆出,公开导出面不变)
66-
iframe-guards.ts # 10 条运行时守卫的编排;每条守卫一个文件在 guards/
66+
iframe-guards.ts # 12 条运行时守卫的编排;每条守卫一个文件在 guards/
6767
guards/ # chrome / shared-worker / fetch-fonts / image-pipeline /
6868
# serverless-save / long-action / series-settings /
6969
# font-loading / comment-selection / canvas-loss /
70-
# wasm-binary-release / unload-prompt / hint-fallback
70+
# wasm-binary-release / unload-prompt / hint-fallback /
71+
# about-source
7172
open-state.ts # 就绪、打开失败、frame 首个错误(三处共用的单一状态源)
7273
open-failure.ts # 失败分类、-82 guard、环境类失败重开一次(经 setOpenRunner 注入避免环)
7374
font-system.ts # 字体系统就绪判定 + awaitFontSystem(#144)
@@ -621,6 +622,16 @@ docs/explorations/2026-08-19-ci-e2e-sharding.md。
621622
7. **循环依赖处理**`onlyoffice-editor.ts``converter.ts` 之间通过回调注入(`setConverterCallbacks`)解耦;`ui.ts``document.ts` 之间通过 `setUICallbacks` 解耦
622623
8. **编辑器操作队列**`createEditorInstance` 内部有 `editorOperationQueue`,防止并发创建/销毁编辑器
623624
9. **.claude/ 目录**:已加入 `.gitignore`,不提交本地 Claude Code 配置
625+
10. **ONLYOFFICE 署名不许再动(2026-08-23)**:本站是 ONLYOFFICE 的衍生作品,vendor
626+
的 AGPL 头附了第 7 条附加条款——**7(b) 必须保留原产品 logo****7(e) 不授予任何
627+
商标权利**。曾经两处都被当成"界面净化"去掉了(`guards/chrome.ts` 隐藏
628+
`#header-logo`、DocEditor 配置 `customization.about: false`),界面上一处标识都不剩。
629+
现在:header logo 与 About 面板都保留,守卫 12(`guards/about-source.ts`)往 About
630+
面板追加"非官方产品 + 源码地址"(AGPL §13),7 种语言的两个页脚都有商标声明,根目录
631+
`NOTICE` 存条款原文、vendor 版本与我们对 vendor 树的全部改动(§5(a) 要求)。
632+
`test/unit/branding-notice.test.ts``test/e2e/vendor-branding.spec.ts` 钉死;
633+
改 vendor 版本后要核对 NOTICE 里的引文与版本号。见
634+
docs/explorations/2026-08-23-onlyoffice-attribution-agpl-section-7.md。
624635

625636
---
626637

NOTICE

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
NOTICE
2+
======
3+
4+
This product is a derivative work of ONLYOFFICE.
5+
6+
The site (https://edit.chaxus.com/, https://github.com/ranuts/document) is
7+
licensed under the GNU Affero General Public License version 3 -- see LICENSE.
8+
It embeds the ONLYOFFICE document editors, which are distributed under the same
9+
license with the additional terms permitted by Section 7 of the GNU AGPL. Those
10+
terms are reproduced verbatim below and apply to this work as well.
11+
12+
13+
1. ONLYOFFICE editors (sdkjs, web-apps)
14+
---------------------------------------
15+
16+
Copyright (C) Ascensio System SIA. All rights reserved.
17+
https://www.onlyoffice.com/
18+
19+
Upstream sources:
20+
https://github.com/ONLYOFFICE/sdkjs
21+
https://github.com/ONLYOFFICE/web-apps
22+
23+
Version shipped in this repository: 9.3.0.133 (build:1), under public/sdkjs/
24+
and public/web-apps/. It is a third-party compiled offline build of those two
25+
projects; the corresponding source is the 9.3.0 release of the repositories
26+
above.
27+
28+
The notice carried by the upstream source files, reproduced in full:
29+
30+
(c) Copyright Ascensio System SIA 2010-2024
31+
32+
This program is a free software product. You can redistribute it and/or
33+
modify it under the terms of the GNU Affero General Public License (AGPL)
34+
version 3 as published by the Free Software Foundation. In accordance with
35+
Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
36+
that Ascensio System SIA expressly excludes the warranty of non-infringement
37+
of any third-party rights.
38+
39+
This program is distributed WITHOUT ANY WARRANTY; without even the implied
40+
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
41+
details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
42+
43+
You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
44+
street, Riga, Latvia, EU, LV-1050.
45+
46+
The interactive user interfaces in modified source and object code versions
47+
of the Program must display Appropriate Legal Notices, as required under
48+
Section 5 of the GNU AGPL version 3.
49+
50+
Pursuant to Section 7(b) of the License you must retain the original Product
51+
logo when distributing the program. Pursuant to Section 7(e) we decline to
52+
grant you any rights under trademark law for use of our trademarks.
53+
54+
All the Product's GUI elements, including illustrations and icon sets, as
55+
well as technical writing content are licensed under the terms of the
56+
Creative Commons Attribution-ShareAlike 4.0 International. See the License
57+
terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
58+
59+
60+
How this work complies with those terms
61+
---------------------------------------
62+
63+
Section 7(b) -- product logo. The ONLYOFFICE logo is shown in the editor
64+
header, and the About pane (product logo, version, Ascensio System SIA
65+
copyright, onlyoffice.com link) is reachable from the left rail. Neither is
66+
suppressed. lib/onlyoffice/guards/chrome.ts hides only the current-user and
67+
co-users widgets, which describe a collaboration session this serverless build
68+
cannot have, and lib/onlyoffice-editor.ts leaves `customization.about` at its
69+
default. test/unit/branding-notice.test.ts and
70+
test/e2e/vendor-branding.spec.ts keep both from being "cleaned up" again.
71+
72+
Section 7(e) -- trademarks. ONLYOFFICE and the ONLYOFFICE logo are trademarks
73+
of Ascensio System SIA. No rights under trademark law are granted by the
74+
license, and none are claimed here. This project is not an official ONLYOFFICE
75+
product and is not affiliated with, sponsored by or endorsed by Ascensio System
76+
SIA. The name is used only to identify the engine this site is built on.
77+
78+
Section 5(a) -- modifications. The vendor tree under public/ is not pristine.
79+
The changes made to it are:
80+
81+
* public/sdkjs/common/wasm/x2t/x2t_helper.js -- patched to load the x2t
82+
WebAssembly module through `Module.instantiateWasm` from a gzip-compressed
83+
response, so the 40 MB binary is never materialised in memory, and to
84+
report load failures to the host page. See
85+
docs/changelogs/2026-08-20-issue-144-memory-and-delivery.md.
86+
* public/sdkjs/common/wasm/x2t/x2t.wasm -- published gzip-compressed only
87+
(x2t.wasm.gz), because the uncompressed file exceeds the host's per-file
88+
limit. The decompressed bytes are unmodified and pinned by sha256 in
89+
test/unit/vendor-contract.test.ts.
90+
* public/web-apps/apps/*/main/locale/*.json -- missing keys filled in from
91+
en.json by bin/locale-fill.mjs for the seven site languages. Untranslated
92+
keys returned `undefined` and crashed the tooltip renderer. Values only;
93+
no key is removed.
94+
* public/web-apps help content trimmed from the shipped tree.
95+
* public/fonts/ -- the font catalog's proprietary font files were replaced
96+
with redistributable open-source families (see docs/font-licenses.md and
97+
docs/changelogs/2026-08-22-font-licensing.md). The catalog registry itself
98+
is unchanged in shape; only the files behind the entries differ.
99+
100+
Nothing else in public/sdkjs/ or public/web-apps/ is edited. The behavioural
101+
patches this site needs are applied at runtime from lib/onlyoffice/guards/,
102+
which leaves the vendor files themselves byte-identical to the build they came
103+
from.
104+
105+
106+
2. x2t WebAssembly converter
107+
----------------------------
108+
109+
The document converter (x2t) is part of ONLYOFFICE core (AGPL-3.0, Ascensio
110+
System SIA) compiled to WebAssembly. The build used here comes from the
111+
third-party project https://github.com/cryptpad/onlyoffice-x2t-wasm.
112+
113+
114+
3. Other components
115+
-------------------
116+
117+
* ranui / ranuts (https://github.com/chaxus/ran) -- the design system and
118+
utilities this site's own interface is built with.
119+
* Fonts under public/fonts/ and public/ran-fonts/ -- see docs/font-licenses.md
120+
for the license of each family.
121+
* Monaco Editor, under public/web-apps/vendor/monaco/ -- shipped by the
122+
vendor build; see the LICENSE and ThirdPartyNotices.txt files in that
123+
directory.
124+
125+
Other trademarks named in this repository and on the site (Microsoft Word,
126+
Excel, PowerPoint, and others) are the property of their respective owners and
127+
are used only to describe the file formats this editor reads and writes.

bin/build-pages.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ const UI = {
162162
],
163163
generatedNote: (src) => `Source: ${src} in the repository`,
164164
ossNote: `<strong>Open source &amp; self-hostable.</strong> Under AGPL-3.0 — verify that nothing is uploaded, or run your own copy: <a href="${REPO}" rel="noopener">github.com/ranuts/document</a>.`,
165+
trademark: `ONLYOFFICE is a trademark of Ascensio System SIA. This site is not an official ONLYOFFICE product and is not affiliated with or endorsed by Ascensio System SIA.`,
165166
},
166167
'zh-CN': {
167168
siteName: 'Document Editor',
@@ -190,6 +191,7 @@ const UI = {
190191
],
191192
generatedNote: (src) => `来源:仓库中的 ${src}`,
192193
ossNote: `<strong>开源 · 可自托管。</strong>采用 AGPL-3.0——你可以核实没有任何上传,或者自建一份:<a href="${REPO}" rel="noopener">github.com/ranuts/document</a>。`,
194+
trademark: `ONLYOFFICE 是 Ascensio System SIA 的商标。本站并非官方 ONLYOFFICE 产品,与 Ascensio System SIA 无隶属关系,也未获其背书。`,
193195
},
194196
ja: {
195197
siteName: 'Document Editor',
@@ -218,6 +220,7 @@ const UI = {
218220
],
219221
generatedNote: (src) => `ソース: リポジトリの ${src}`,
220222
ossNote: `<strong>オープンソース・セルフホスト可能。</strong>AGPL-3.0 のもとで公開——何もアップロードされないことを自分で確認でき、自分で運用することもできます: <a href="${REPO}" rel="noopener">github.com/ranuts/document</a>。`,
223+
trademark: `ONLYOFFICE は Ascensio System SIA の商標です。本サイトは公式の ONLYOFFICE 製品ではなく、Ascensio System SIA との提携も推奨関係もありません。`,
221224
},
222225
de: {
223226
siteName: 'Document Editor',
@@ -246,6 +249,7 @@ const UI = {
246249
],
247250
generatedNote: (src) => `Quelle: ${src} im Repository`,
248251
ossNote: `<strong>Open Source &amp; selbst hostbar.</strong> Unter AGPL-3.0 — prüfen Sie selbst, dass nichts hochgeladen wird, oder betreiben Sie eine eigene Kopie: <a href="${REPO}" rel="noopener">github.com/ranuts/document</a>.`,
252+
trademark: `ONLYOFFICE ist eine Marke von Ascensio System SIA. Diese Website ist kein offizielles ONLYOFFICE-Produkt und steht in keiner Verbindung zu Ascensio System SIA.`,
249253
},
250254
es: {
251255
siteName: 'Document Editor',
@@ -274,6 +278,7 @@ const UI = {
274278
],
275279
generatedNote: (src) => `Fuente: ${src} en el repositorio`,
276280
ossNote: `<strong>Código abierto y autoalojable.</strong> Bajo AGPL-3.0: comprueba que no se sube nada, o ejecuta tu propia copia: <a href="${REPO}" rel="noopener">github.com/ranuts/document</a>.`,
281+
trademark: `ONLYOFFICE es una marca de Ascensio System SIA. Este sitio no es un producto oficial de ONLYOFFICE ni está afiliado a Ascensio System SIA ni respaldado por ella.`,
277282
},
278283
ko: {
279284
siteName: 'Document Editor',
@@ -302,6 +307,7 @@ const UI = {
302307
],
303308
generatedNote: (src) => `출처: 저장소의 ${src}`,
304309
ossNote: `<strong>오픈 소스이며 직접 호스팅할 수 있습니다.</strong> AGPL-3.0으로 공개되어 있어, 아무것도 업로드되지 않는다는 것을 직접 확인하거나 직접 운영할 수 있습니다: <a href="${REPO}" rel="noopener">github.com/ranuts/document</a>.`,
310+
trademark: `ONLYOFFICE는 Ascensio System SIA의 상표입니다. 이 사이트는 공식 ONLYOFFICE 제품이 아니며 Ascensio System SIA와 제휴하거나 후원받지 않았습니다.`,
305311
},
306312
pt: {
307313
siteName: 'Document Editor',
@@ -330,6 +336,7 @@ const UI = {
330336
],
331337
generatedNote: (src) => `Fonte: ${src} no repositório`,
332338
ossNote: `<strong>Código aberto e auto-hospedável.</strong> Sob a AGPL-3.0 — confira você mesmo que nada é enviado, ou rode a sua própria cópia: <a href="${REPO}" rel="noopener">github.com/ranuts/document</a>.`,
339+
trademark: `ONLYOFFICE é uma marca da Ascensio System SIA. Este site não é um produto oficial do ONLYOFFICE nem tem afiliação ou endosso da Ascensio System SIA.`,
333340
},
334341
};
335342

@@ -1020,6 +1027,7 @@ ${footLinks}
10201027
</nav>
10211028
<r-theme-switch class="theme-switch" label="${e(ui.themeLabel)}"></r-theme-switch>
10221029
<span class="lic">${e(data.foot.license)}</span>
1030+
<p class="tm">${e(ui.trademark)}</p>
10231031
</footer>
10241032
</section>
10251033
@@ -1266,6 +1274,7 @@ ${aside} </div>
12661274
${footer}
12671275
<a href="${REPO}" rel="noopener">GitHub</a>
12681276
<r-theme-switch class="theme-switch" label="${ui.themeLabel}"></r-theme-switch>
1277+
<p class="tm">${escapeHtml(ui.trademark)}</p>
12691278
</footer>
12701279
</body>
12711280
</html>

docs/embed-api.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ window.addEventListener('message', (event) => {
7171
7272
### From URL
7373
74+
> **The URL must allow CORS.** The browser -- not a server -- fetches the file,
75+
> so the response needs an `Access-Control-Allow-Origin` header that covers the
76+
> page the editor runs on. Without it the request is blocked before the editor
77+
> sees a single byte, and the same is true of `?src=` and `?file=` on the URL.
78+
> This is the single most common thing to get wrong when integrating: if a file
79+
> opens when you download it by hand but not through the editor, check the
80+
> response headers first. Cross-origin redirects have to keep the header too.
81+
> When you cannot add it (a third-party host, a signed URL, anything behind
82+
> auth), fetch the file in the parent page and pass the bytes with
83+
> `document:open-buffer` instead.
84+
7485
```js
7586
sendEditorCommand('document:open-url', {
7687
url: 'https://example.com/files/demo.xlsx',

docs/embed-api.zh.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ window.addEventListener('message', (event) => {
7171
7272
### 通过 URL
7373
74+
> **这个 URL 必须允许 CORS。** 取文件的是浏览器而不是服务器,所以响应里要有覆盖编辑器所在
75+
> 页面的 `Access-Control-Allow-Origin` 头。没有它,请求在编辑器拿到第一个字节之前就被拦掉了;
76+
> URL 上的 `?src=``?file=` 同理。这是接入时最容易踩的一脚:如果一个文件手动下载能打开、
77+
> 走编辑器打不开,先看响应头。跨域跳转也要一路带着这个头。
78+
> 加不了的场景(第三方主机、签名 URL、需要鉴权的接口),改由父页面自己 fetch,再用
79+
> `document:open-buffer` 把字节传进来。
80+
7481
```js
7582
sendEditorCommand('document:open-url', {
7683
url: 'https://example.com/files/demo.xlsx',

0 commit comments

Comments
 (0)