You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into an issue while using this middleware to protect a Jellyfin instance.
Requests to the /Videos/:media_id/stream.mp4 endpoint use the Range HTTP header to request chunks of video data piece-by-piece.
Initially, with Range: bytes=0-, the request is checked correctly and the WAF functions as expected.
However, when a request containing an offset (e.g. mid-way through a video) is relayed to the WAF container, Apache will respond with 416 Requested Range Not Satisfiable if the offset is larger than the whoami response.
The 4XX error is then returned directly to the client and the stream breaks.
Problem
I've run into an issue while using this middleware to protect a Jellyfin instance.
Requests to the
/Videos/:media_id/stream.mp4
endpoint use theRange
HTTP header to request chunks of video data piece-by-piece.Initially, with
Range: bytes=0-
, the request is checked correctly and the WAF functions as expected.However, when a request containing an offset (e.g. mid-way through a video) is relayed to the WAF container, Apache will respond with
416 Requested Range Not Satisfiable
if the offset is larger than thewhoami
response.The 4XX error is then returned directly to the client and the stream breaks.
Steps to reproduce
traefik:v3.2
github.com/acouvreur/traefik-modsecurity-plugin:v1.3.0
owasp/modsecurity-crs:4.9.0-apache-202412120712
containous/whoami:latest
Notes
As a hack to get it working, I've added the following section to my
RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
config file:# Remove Range header because it doesn't work with `whoami` RequestHeader unset Range
This strips the header after it has been processed by ModSecurity, but before it gets sent to
whoami
, so you still get the protection of the WAF:... without the broken behaviour:
The text was updated successfully, but these errors were encountered: