Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

COOP and COEP exemptions compare with the context path, so page exemptions never match

オープン 初心者向け
#1,661 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@asvanberg がすでに取り組んでいます。

2026年10月20日 から。

  • #1694 @asvanberg による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
backend, security

調査の方向性

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/wicket のほかの issue

apache/wicket の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。