mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Fix URL extension parsing
when there is a querystring Pi-hole sometimes parsed a wrong extension
This commit is contained in:
parent
8c2b8f7241
commit
9934f505a5
1 changed files with 2 additions and 1 deletions
|
@ -21,8 +21,9 @@ if ($serverName === 'pi.hole')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve server URI extension (EG: jpg, exe, php)
|
// Retrieve server URI extension (EG: jpg, exe, php)
|
||||||
|
// strtok($uri, '\?') splits the querystring from the path (if there is a querystring)
|
||||||
ini_set('pcre.recursion_limit',100);
|
ini_set('pcre.recursion_limit',100);
|
||||||
$uriExt = pathinfo($uri, PATHINFO_EXTENSION);
|
$uriExt = pathinfo(strtok($uri,'\?'), PATHINFO_EXTENSION);
|
||||||
|
|
||||||
// Define which URL extensions get rendered as "Website Blocked"
|
// Define which URL extensions get rendered as "Website Blocked"
|
||||||
$webExt = array('asp', 'htm', 'html', 'php', 'rss', 'xml');
|
$webExt = array('asp', 'htm', 'html', 'php', 'rss', 'xml');
|
||||||
|
|
Loading…
Reference in a new issue