Adam Warner
07195fb4e7
Allow user to add in a comment next to domain entry
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2019-10-14 21:55:29 +01:00
DL6ER
965f2083a6
Remove special handling for audited domains and just add them separately to both lists.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-07 22:20:00 +02:00
DL6ER
586224fde2
Replace PREG_SPLIT_NO_EMPTY by using trim().
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-07 21:57:59 +02:00
DL6ER
838516e558
Ensure preg does not output empty array elements.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-07 21:44:01 +02:00
DL6ER
07af532b09
Review comments
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-07 21:32:49 +02:00
DL6ER
71fc7a4791
Use preg_split() instead of explode() for better space handling. Skip empty domains in add_to_table() and remove_from_table().
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-07 21:23:29 +02:00
DL6ER
7807f12d65
Fix codefactor complaints.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-06 22:08:18 +02:00
DL6ER
424fe7636b
Call "sudo pihole restartdns reload" after having added or removed domains to notify FTL of the updated lists.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-06 22:02:36 +02:00
DL6ER
98e5f21373
Move add_to_table() to database.php.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-06 20:49:49 +02:00
DL6ER
6ca35b0b76
Update comment and change require() to require_once().
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-06 20:32:49 +02:00
DL6ER
c9f5c9500a
Directly modify gravity tables from the lists pages.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-05 21:55:08 +02:00
DL6ER
bc7aef744c
"pihole --whiteregex" has been renamed to "pihole --white-regex". Similar for "--whitewild" -> "--white-wild".
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-08-05 21:13:53 +02:00
DL6ER
dfcfafd6d9
Implement whitelist regex support to web interface.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-22 21:15:50 +02:00
DL6ER
dab155c2bf
We need to use \$domains instead of \$domain when addin domains to the audit log.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-05 17:14:24 +02:00
DL6ER
8b0ee8f4fa
Reduce code duplication
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-04-26 18:29:05 +02:00
DL6ER
506644b671
Rewrite web interface to allow interaction with database-based lists
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-04-25 15:02:39 +02:00
Mcat12
24a22bcb55
Fix security issue when using list functionality via api.php
...
Remote code execution could have been triggered by activating some list
functionality (add and remove) via api.php.
Thanks to Kacper Szurek for finding this bug.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-03-02 13:51:29 -08:00
Michael Epstein
84f6f3dae6
- Fix the delete of blacklist/whitelist records under NGINX + PHP-FPM
...
- Fix multiple php warning/error messages when this scripts are executed from AJAX requests
Example errors/warnings:
2019/01/15 13:22:22 [error] 1408#1408: *2535 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: api in /var/www/html/admin/scripts/pi-hole/php/sub.php on line 16
PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/scripts/pi-hole/php/sub.php:8) in /var/www/html/admin/scripts/pi-hole/php/auth.php on line 81
PHP message: PHP Warning: session_start(): Cannot start session when headers already sent in /var/www/html/admin/scripts/pi-hole/php/auth.php on line 93
Signed-off-by: Michael Epstein <mepstein@mediabox.cl >
2019-01-16 01:51:54 -03:00
DL6ER
99b0535f8e
Remove empty line at beginning of output of add.php
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-11-29 18:41:30 +01:00
DL6ER
21ab29dedc
Use shell_exec() instead of exec() to obtain the full script output (and not only the last line!)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-11-29 18:39:23 +01:00
DL6ER
1709631949
Don't use --quiet flag for adding hosts to white- and blacklist
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-11-29 18:02:44 +01:00
Mike Souza
203d41103a
Add API support for list actions
...
Signed-off-by: Mike Souza <contact@michael-souza.com >
2018-08-26 11:56:44 -04:00
Mcat12
57698ba45a
Fix permissive regex
...
The `\.?` is too permissive, letting in anything that ends in the domain
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-07-31 22:17:25 -04:00
Mcat12
b7ad22c51e
Use simpler regex format for wildcards
...
Use `\.?domain\.com$` instead of `((^)|(\.))domain\.com$`
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-07-31 21:35:27 -04:00
DL6ER
3e4613caf0
Move function add_regex($regex) to func.php
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-07-15 12:48:46 +02:00
Mcat12
2759ec0da5
Add missing break statements
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-30 15:18:13 -04:00
DL6ER
4566db2a7c
Use passed argument in new function add_regex()
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-06-30 14:30:45 +02:00
DL6ER
ec0afceeed
Add new button to allow both regex filters and legacy wildcards (get automatically converted to regex format)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-06-30 14:19:03 +02:00
Mcat12
4259aada78
Don't leave a newline at the end of the regex file
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-06-29 23:03:01 -04:00
DL6ER
c0da231fa6
Force reload of the regex filters in FTLDNS after having added/removed one from the dashboard
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-06-24 12:42:05 +02:00
DL6ER
1935544183
Directly manipulate regex.list from PHP to avoid detour over bash. This needs read/write permissions of the PHP user on "/etc/pihole/regex.list" !
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-06-23 15:50:19 +02:00
DL6ER
349faac048
Implemented also actions for audit log
2017-04-22 16:10:18 +02: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
8080afadac
Make ADD, SUB and GET compatible with the wildcard blocking list
2016-12-31 15:36:47 +00:00
Mcat12
ca9418a245
Merge branch 'devel' into restructureFolders
2016-12-30 14:44:26 -05: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