mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fixed URL decoding and section filter protection.
This commit is contained in:
parent
e4657c1820
commit
45192e924a
10
README
10
README
@ -89,11 +89,11 @@ Configuration:
|
||||
|
||||
- channels.conf
|
||||
|
||||
TV4;IPTV:60:S=1|P=0|F=EXT|U=iptvstream.sh|A=0:I:0:0:680:0:0:4:0:0:0
|
||||
TV3;IPTV:50:S=0|P=1|F=FILE|U=/video/stream.ts|A=5:I:0:514:670:2321:0:3:0:0:0
|
||||
TV2;IPTV:40:S=0|P=1|F=HTTP|U=127.0.0.1/TS/2|A=3000:I:0:513:660:2321:0:2:0:0:0
|
||||
TV1;IPTV:30:S=1|P=0|F=CURL|U=http%3A//foo%3Abar@127.0.0.1%3A3000/TS/2|A=0:I:0:512:650:2321:0:1:0:0:0
|
||||
TV1;IPTV:20:S=1|P=0|F=UDP|U=127.0.0.1@127.0.0.1|A=1234:I:0:512:650:2321:0:1:0:0:0
|
||||
TV4;IPTV:60:S=1|P=0|F=EXT|U=iptvstream.sh|A=0:I:0:0:680:0:0:6:0:0:0
|
||||
TV3;IPTV:50:S=0|P=1|F=FILE|U=/video/stream.ts|A=5:I:0:514:670:2321:0:5:0:0:0
|
||||
TV2;IPTV:40:S=0|P=1|F=HTTP|U=127.0.0.1/TS/2|A=3000:I:0:513:660:2321:0:4:0:0:0
|
||||
TV1;IPTV:30:S=1|P=0|F=CURL|U=http%3A//foo%3Abar@127.0.0.1%3A3000/TS/2|A=0:I:0:512:650:2321:0:3:0:0:0
|
||||
TV1;IPTV:20:S=1|P=0|F=UDP|U=127.0.0.1@127.0.0.1|A=1234:I:0:512:650:2321:0:2:0:0:0
|
||||
TV1;IPTV:10:S=1|P=0|F=UDP|U=127.0.0.1|A=1234:I:0:512:650:2321:0:1:0:0:0
|
||||
^ ^ ^ ^ ^ ^ ^
|
||||
| | | | | | Source type ("I")
|
||||
|
4
device.c
4
device.c
@ -339,11 +339,11 @@ int cIptvDevice::OpenFilter(u_short pidP, u_char tidP, u_char maskP)
|
||||
// Check if disabled by user
|
||||
if (!IptvConfig.GetSectionFiltering())
|
||||
return -1;
|
||||
// Lock
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
// Blacklist check, refuse certain filters
|
||||
if (IsBlackListed(pidP, tidP, maskP))
|
||||
return -1;
|
||||
// Lock
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
// Search the next free filter slot
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
if (!secFiltersM[i]) {
|
||||
|
@ -265,9 +265,9 @@ bool cIptvProtocolCurl::Connect()
|
||||
iptv_curl_easy_setopt(handleM, CURLOPT_USERAGENT, *cString::sprintf("vdr-%s/%s", PLUGIN_NAME_I18N, VERSION));
|
||||
|
||||
// Set URL
|
||||
//char *p = curl_easy_unescape(handleM, *streamUrlM, 0, NULL);
|
||||
//streamUrlM = p;
|
||||
//curl_free(p);
|
||||
char *p = curl_easy_unescape(handleM, *streamUrlM, 0, NULL);
|
||||
streamUrlM = p;
|
||||
curl_free(p);
|
||||
iptv_curl_easy_setopt(handleM, CURLOPT_URL, *streamUrlM);
|
||||
|
||||
// Protocol specific initializations
|
||||
@ -491,12 +491,8 @@ bool cIptvProtocolCurl::Set(const char* locationP, const int parameterP, const i
|
||||
if (!isempty(locationP)) {
|
||||
// Disconnect
|
||||
Disconnect();
|
||||
// Update stream URL: colons (%3A) and pipes (%7C) shall be decoded
|
||||
char *s = strdup(locationP);
|
||||
strreplace(s, "%3A", ":");
|
||||
strreplace(s, "%7C", "|");
|
||||
streamUrlM = s;
|
||||
free(s);
|
||||
// Update stream URL
|
||||
streamUrlM = locationP;
|
||||
if (startswith(*streamUrlM, "rtsp") || startswith(*streamUrlM, "RTSP"))
|
||||
modeM = eModeRtsp;
|
||||
else if (startswith(*streamUrlM, "https") || startswith(*streamUrlM, "HTTPS"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user