Accept the Bertina Browser token in the supported-browser check (Chromium 158 based)

未关闭 适合新手
#66,922 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
领域
frontend

调研方向

从 core/src/services/BrowsersListService.ts 开始,那里构建了 supportedBrowsersRegExp,并且 AscDesktopEditor 已经被追加到该表达式中;然后检查 core/src/utils/RedirectUnsupportedBrowsers.js 中的 testSupportedBrowser()。确认 issue 中的 Bertina/158.0.0.0 user-agent 字符串在当前正则下不匹配,而在修改后可以匹配。完成的标准是:这些字符串通过检查,Chromium 111 以下版本仍会被重定向,并且对受支持浏览器的现有行为保持不变。

由索引模型根据 Issue 内容生成。

描述

[!TIP]

Help move this idea forward
  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.

Users of Bertina Browser are sent to the "Your browser is not supported" page (/unsupported) on Nextcloud servers. Bertina is built on Chromium 158 (Windows, Linux, macOS, Android; download page, in Persian: https://bertina.me/download), but it identifies itself with its own product token and does not send a Chrome/ token:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Bertina/158.0.0.0 Safari/537.36
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Bertina/158.0.0.0 Mobile Safari/537.36

supportedBrowsersRegExp in core/src/services/BrowsersListService.ts is generated from the browserslist config, so it has no entry that can match this string, and testSupportedBrowser() in core/src/utils/RedirectUnsupportedBrowsers.js redirects.

How this was checked: the expression was rebuilt locally from master with [email protected] and @nextcloud/[email protected]; it does not match the strings above and does match the same strings with Chrome/158.0.0.0. The report came from a Bertina user who met the page on a Nextcloud server; we have not tested against a server instance ourselves.

Describe the solution you'd like

Accept the Bertina/<version> token for versions 111 and above (the token's major version is the Chromium major version), in the place where AscDesktopEditor is already appended to the expression. For example:

+ '|AscDesktopEditor|Bertina\\/(11[1-9]|1[2-9]\\d|[2-9]\\d\\d)'

We are happy to send a pull request if this approach is acceptable.

Describe alternatives you've considered

  • The "Continue with this unsupported browser" button works, but users read the page as "this browser cannot be used here".
  • Detecting through User-Agent Client Hints: Bertina sends Sec-CH-UA: "Chromium";v="158", "Not.A/Brand";v="24", "Bertina Browser";v="158", so a check of navigator.userAgentData.brands for Chromium ≥ 111 would cover Bertina and any other Chromium-based browser without naming each one.

Additional context

Submitted on behalf of the Bertina Browser project. Prepared with the help of an AI coding assistant; the measurements above were run before submission.

主要语言
PHP
星标
37.6k
派生
5.4k
平均合并
1 天 16 小时
30 天内合并 PR
660

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/server 的其他 Issue

查看 nextcloud/server 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。