COOP and COEP exemptions compare with the context path, so page exemptions never match
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 67/100
調査の方向性
CrossOriginOpenerPolicyRequestCycleListener と CrossOriginEmbedderPolicyRequestCycleListener を読み、続いて testCoopHeadersNotSetExemptedPath と testCoepHeadersNotSetExemptedPath を調べてください。例外テストで各ポリシーを有効にし、アプリケーション内で例外とリクエストパスを比較してください。addExemptedPath に想定されるパス形式を記載してください。例外対象のページではヘッダーが省略され、例外対象でないページでは引き続きヘッダーが返されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
CrossOriginOpenerPolicyRequestCycleListener and CrossOriginEmbedderPolicyRequestCycleListener decide whether a request is exempted from the header with
String path = request.getContextPath();
if (coopConfig.getExemptions().contains(path))
getContextPath() is the context path of the web application, the same for every request (often ""), not the path of the requested page. A path added with addExemptedPath("/some/page") therefore never matches, and the header is sent on every page. Only exempting the context path itself has an effect, and then it exempts the whole application.
The tests do not catch this: testCoopHeadersNotSetExemptedPath and testCoepHeadersNotSetExemptedPath run with CoopMode.DISABLED / CoepMode.DISABLED, where no header is sent at all, so they pass whether or not the exemption works.
Proposed fix: compare the exemptions with the request path inside the application (for example the servlet path plus path info, or the Wicket request URL), test an exemption with the policy enabled, and document in addExemptedPath which form of path is expected. Same code on master and wicket-10.x.
- 主要言語
- Java
- スター
- 800
- フォーク
- 421
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 46
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/wicket のほかの issue
-
The CSP report-uri is lost in development mode because strict() clears it再び着手できるかも @VelpulaGangavardhan が 8 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/wicket#1660 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/wicket#1567 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
Quickstart: mvn jetty:run has no SLF4J back end after slf4j-simple moved to test scope対応中かも @dashorst が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
apache/wicket#1690 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix対応中かも @ItsDeadlyProgrammer が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
appsmithorg/appsmith#42471 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
code-maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
carlos-emr/carlos#5258 ·
メンテナーはふだん 1 日以内に返信
-
bug: author create/update with an unknown avatarId returns 404 instead of 400 UNKNOWN_REFERENCE対応中かも @Vinu2111 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
atomityhq/blog-cms#59 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信