Remove the Bowser browser detection (Internet Explorer 8 warning)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
まず、system/core/bowser.php が loadBowser() をどのように登録し、index.php が system/bowser/ をどのように配信するかを追跡します。system/languages/en.php と nl.php にあるポップアップの翻訳キーがほかで使われているか調べます。Bowser とその登録、配信ルート、未使用の翻訳を削除します。IE の警告と Bowser のアセットがなくなり、削除したキーやライブラリへの参照が残っていなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Hypha bundles Bowser 1.x, a browser-detection library. It is used for one thing only: warning visitors who use Internet Explorer 8 or older. Those browsers have been out of use for years, so the library no longer serves a purpose.
Yet every visitor downloads it on every page. It is also outdated third-party JavaScript that has to be tracked and audited. Removing it means one request less per page and one bundled library less.
This was split off from #437 (outdated bundled JavaScript), so that it can be handled on its own; it does not depend on the jQuery or WYMeditor work there.
Affected code (dev 5dae13a; the same files are on master)
| File | What |
|---|---|
system/bowser/bowser.min.js |
Bowser 1.x. There is no version string in the file; the 2015 copyright and the bowser.check() API belong to the 1.x line. |
system/core/bowser.php |
Registers loadBowser() as a post-processing function. It links bowser.min.js into every page and adds an inline script that shows a "browser not supported" popup when bowser.name === 'msie' and the version is below 9. |
index.php |
Serves the files under system/bowser/ (serveFile($hyphaQuery, 'system/bowser')). |
Impact
No known vulnerability in Bowser 1.x. The cost is unnecessary JavaScript on every page, and an outdated library that security scanners flag. Severity: Low.
Suggested fix
Note: this is a suggestion and a starting point, not a finished fix. Please review it and adapt it as you see fit.
- Delete
system/bowser/andsystem/core/bowser.php. - Remove the
system/bowserline from the static file shortcuts inindex.php. - Remove the translation keys used only by the popup (
browser,not-supported) fromsystem/languages/en.phpandnl.php, if no other code uses them. - If a browser check is still wanted, a few lines of feature detection suffice. For example, warn when
fetchorclassListis missing, without a library.
Related: #437, #96.
- 主要言語
- JavaScript
- スター
- 5
- フォーク
- 9
- 平均マージ
- 18時間 7分
- マージ済み PR(30日)
- 11
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PlanBCode/hypha のほかの issue
-
Impact: Medium Level: Easy Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Type: Bug Value: Coders
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
PlanBCode/hypha#586 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Type: Bug Usecase: De Stadsbron Value: Visitors
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
PlanBCode/hypha#522 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
PlanBCode/hypha の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
awslabs/visual-asset-management-system#880 ·
メンテナーはふだん 1 日以内に返信
-
04 type: enhancement 33 needs: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
possible bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Mintplex-Labs/anything-llm#6889 ·
メンテナーはふだん 1 日以内に返信