-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix URL extension parsing #1602
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,9 @@ function validIP($address){ | |
} | ||
|
||
// 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); | ||
$uriExt = pathinfo($uri, PATHINFO_EXTENSION); | ||
$uriExt = pathinfo(strtok($uri,'\?'), PATHINFO_EXTENSION); | ||
|
||
// Define which URL extensions get rendered as "Website Blocked" | ||
$webExt = array('asp', 'htm', 'html', 'php', 'rss', 'xml'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2/2... does this fix now render this line unnecessary? From my testing, I tried with Seems to make sense to me, but @WaLLy3K may want to confirm as block page is his baby! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That is to say, that's how I originally intended for it to be - I'm not 120% familiar with the current Block Page derivative as I am with my own. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this not working before because it wasn't actually setting a variable anywhere? If that's the case... 1/2