Connection response header is seen by the rules on HTTP/2 responses
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c, nginx
- Ambito
- backend, networking
Direzione di ricerca
The synthesized Connection and Keep-Alive headers are built in the response-header filter in src/ngx_http_modsecurity_header_filter.c, around lines 297-345, which the issue links. Read that block, then confirm how HTTP/2 and HTTP/3 streams are distinguished from HTTP/1 there. Done means RESPONSE_HEADERS contains no Connection or Keep-Alive for h2 and h3 responses while HTTP/1 behaviour is unchanged. Pull request #417 is already open against this issue, so check it before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The response-header filter synthesizes a Connection header for the rules, because nginx only adds it in its terminal HTTP/1 header filter:
It does so for every request, including HTTP/2 (and HTTP/3) ones. Those protocols forbid connection-specific header fields (RFC 9113 §8.2.2, RFC 9114 §4.2) and nginx never sends them there, so on an HTTP/2 response the rules see Connection: close although no such header is sent:
listen 8443 ssl;
http2 on;
modsecurity_rules '
SecRuleEngine On
SecRule &RESPONSE_HEADERS:Connection "!@eq 0" "id:1,phase:3,deny,status:403"
';
Every HTTP/2 response to this location is a 403, while over HTTP/1 the rule behaves as written. A rule written against RESPONSE_HEADERS:Connection therefore false-positives on every HTTP/2 response.
(Keep-Alive comes from the same function but needs r->keepalive, which is never set on an HTTP/2 stream, so in practice only Connection is affected.)
Expected: no Connection / Keep-Alive in RESPONSE_HEADERS for HTTP/2 and HTTP/3 responses.
- Lingua principale
- Perl
- Stelle
- 1.9k
- Fork
- 312
- Merge medio
- 2g 22h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di owasp-modsecurity/ModSecurity-nginx
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
owasp-modsecurity/ModSecurity-nginx#418 ·
I maintainer di solito rispondono entro 1 giorno
-
Possible dereference of NullAperta:1st_place_medal: good first issue enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
owasp-modsecurity/ModSecurity-nginx#359 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Relative Location response header is seen by the rules, nginx sends it absoluteForse già presa @fzipi l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
owasp-modsecurity/ModSecurity-nginx#422 ·
I maintainer di solito rispondono entro 1 giorno
-
Transfer-Encoding and Connection response headers seen by the rules don't match the chunked filter'sForse già presa @fzipi l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
owasp-modsecurity/ModSecurity-nginx#420 ·
I maintainer di solito rispondono entro 1 giorno
-
Documentation: Clarify dynamic module ABI compatibility with distribution-patched NGINX packagesForse già presa @airween l’ha presa oggi. Apertaenhancement
owasp-modsecurity/ModSecurity-nginx#419 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di owasp-modsecurity/ModSecurity-nginx
Issue simili
-
fix(rodex): sent mail loses the last character of title and bodyForse già presa @baphomello l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
inverse-inc/packetfence#9768 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
metacpan/metacpan-api#1534 ·