Description
Hi,
We are using the nginx-secure-token-module and it seems to work perfectly when the m3u8 file does not contain any '?' in the ts, but if it contains '?', the '?' is appended twice.
I have attached
- nginx.txt
- playlist11.txt
- playlist12.txt
nginx.txt
playlist11.txt
playlist12.txt
The playlist files should be renamed to m3u8 extension, and placed in "/var/www/html/video/" folder.
nginx.txt should be renamed to nginx.conf.
Thereafter, after starting the server, we hit two urls.
curl -X GET 'http://localhost/video/playlist11.m3u8?__hdnea__=abc'
The above gives output
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.343667,
z_video1_cuhunk_0.ts?hdnea=st=1608196639exp=1608283039acl=/*hmac=b0ba41f5206c1965c0e8bf423192230bdd042016becd5640a56097be5d2b62feexp=1608283039
#EXTINF:9.776433,
z_video1_cuhunk_1.ts?hdnea=st=1608196639acl=/*acl=/*~hmac=b0ba41f5206c1965c0e8bf423192230bdd042016becd5640a56097be5d2b62fehmac=b0ba41f5206c1965c0e8bf423192230bdd042016becd5640a56097be5d2b62feexp=1608283039
#EXTINF:9.976633,
z_video1_cuhunk_2.ts?hdnea=st=1608196639
#EXT-X-ENDLIST
The second url
curl -X GET 'http://localhost/video/playlist12.m3u8?__hdnea__=abc'
gives the wrong output, as it appends '?' twice.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.343667,
z_video1_cuhunk_0.ts?a=b?hdnea=st=1608196781exp=1608283181acl=/*hmac=d55c2028f8bc4dca8f6e3811349a627f3e4855ffcf6cf44cc67d154ef4160824exp=1608283181
#EXTINF:9.776433,
z_video1_cuhunk_1.ts?a=b?hdnea=st=1608196781acl=/*acl=/*~hmac=d55c2028f8bc4dca8f6e3811349a627f3e4855ffcf6cf44cc67d154ef4160824hmac=d55c2028f8bc4dca8f6e3811349a627f3e4855ffcf6cf44cc67d154ef4160824exp=1608283181
#EXTINF:9.976633,
z_video1_cuhunk_2.ts?a=b?hdnea=st=1608196781
#EXT-X-ENDLIST
It is because the playlist12.m3u8 has ?a=b in it. For simplicity, i have disabled the validation.
Is it a bug or am i doing something wrong here?
There seem to be other issues raised who have raised this, like this and this