Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#1,661 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@VelpulaGangavardhan ci sta già lavorando.

Dal 16/10/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
67/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
backend, security

Direzione di ricerca

Leggi CrossOriginOpenerPolicyRequestCycleListener e CrossOriginEmbedderPolicyRequestCycleListener, quindi esamina testCoopHeadersNotSetExemptedPath e testCoepHeadersNotSetExemptedPath. Abilita ciascuna policy nei test delle eccezioni e confronta le eccezioni con il percorso della richiesta all’interno dell’applicazione; documenta in addExemptedPath il formato del percorso previsto. Il risultato è raggiunto quando una pagina esente omette l’header, mentre le pagine non esenti continuano a riceverlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Java
Stelle
797
Fork
416
Merge medio
1g 7h
PR unite (30g)
41

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/wicket

Tutte le issue di apache/wicket

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.