Commit Graph

15 Commits

Author SHA1 Message Date
Michael Epstein
6447879562 Fix a PHP error generated by "Query Lists".
Example:
2019/01/18 00:56:46 [error] 19780#19780: *20783 FastCGI sent in stderr: "PHP message: PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in /var/www/html/admin/scripts/pi-hole/php/queryads.php on line 9" while reading response header from upstream, client: xxx.xxx.xx.xx, server: some.server.lan, request: "GET /admin/scripts/pi-hole/php/queryads.php?domain=windows& HTTP/1.1", upstream: "fastcgi://unix:/run/php/pihole.sock:", host: "some.server.lan", referrer: "https://some.server.lan/admin/queryads.php"

Signed-off-by: Michael Epstein <mepstein@mediabox.cl>
2019-01-18 01:25:59 -03:00
Mark Drobnak
9d4e545593 Use simpler check for dash in is_valid_domain_name
Signed-off-by: Mark Drobnak <mark.drobnak@gmail.com>
2018-11-24 11:21:54 -05:00
Mcat12
e7f4ef8a09 Prevent domains sent to queryAds acting as command line options
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-23 14:43:08 -05:00
ail1020
78f031869f Display the name of the blocklist URL
added -adlist arg to the query command
2018-01-28 20:17:48 -06:00
WaLLy3K
3a17f9da13 Rebase off devel to only add "-bp" functionality
* Included pcre.recursion_limit as a safety cutoff measure
2017-07-19 00:29:47 +10:00
WaLLy3K
ab126d94e0 Modifications to support core queryFunc() changes
* Set pcre.recursion_limit, 3x the limit necessary to process a valid 253 character domain name
* Updated validate_domain() to include underscore as a valid character within a domain 
* Run escapeshellarg() on `pihole -q` command in the unlikely event that a maliciously crafted domain query is able to pass validate_domain()
* Known issues: Changes to the output of this file and Pi-hole core's queryFunc() results in `queryads.js` failing to work (Thereby breaking Tools > Query adlists)
2017-05-02 10:47:02 +10:00
DL6ER
8a4861c194 Merge pull request #439 from pi-hole/fix/queryads
Allow block page to access queryads
2017-03-10 14:44:56 +01:00
DL6ER
276f2c1628 Allow usage of Teleporter and QueryAds backend only if a valid session is detected (#415) 2017-02-27 22:32:03 +01:00
DL6ER
d1ed5652a8 Another small change to ensure the remining line endings are also gone 2017-02-20 23:11:38 +01:00
Adam Warner
94539d3952 whitespace in licence header causing issues with query adlists page 2017-02-20 21:41:55 +00:00
DL6ER
4f70973cbc EUPL license (#402)
* Move whole project to EUPL, copy MIT license to scripts/vendor/ and style/vendor/

* Added header to main PHP files

* Modified scripts in scripts/pi-hole/php

* Added header to scripts/pi-hole/js files

* Added license header to our custom style script

* Slight reformulation
2017-02-18 14:20:51 +01:00
DL6ER
a6b3bc1cb4 Add IE mode to PHP scripts 2017-01-14 15:29:23 +01:00
Mcat12
2f65430a4d Move PHP scripts to scripts folder 2016-12-21 21:09:58 +01:00
DL6ER
e188cb6fbc Revert "Merge pull request #267 from pi-hole/folderStructure"
This reverts commit fba3d10fa4, reversing
changes made to 4ee75f4167.
2016-12-21 17:16:52 +01:00
Mcat12
d1da1de597 Move PHP scripts to scripts folder 2016-12-19 19:44:51 -05:00