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

Offen Anfängerfreundlich
#66,922 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
62/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Bereich
frontend

Rechercherichtung

Beginne in core/src/services/BrowsersListService.ts, dort wird supportedBrowsersRegExp erstellt und AscDesktopEditor ist bereits an den Ausdruck angehängt. Prüfe danach testSupportedBrowser() in core/src/utils/RedirectUnsupportedBrowsers.js. Bestätige, dass die User-Agent-Strings aus dem Issue mit Bertina/158.0.0.0 den aktuellen Regex nicht erfüllen und nach der Änderung passen. Fertig ist, wenn diese Strings die Prüfung bestehen, Chromium-Versionen unter 111 weiterhin umgeleitet werden und das bestehende Verhalten für unterstützte Browser unverändert bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

[!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.

Vorherrschende Sprache
PHP
Sterne
37.6k
Forks
5.4k
Ø Merge
1 T. 16 Std.
Gemergte PRs (30 T.)
660

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nextcloud/server

Alle Issues in nextcloud/server

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.