Adam Warner
483f5037db
Merge pull request #1625 from pi-hole/tweak/replace_domains
...
Add new replace_domain action to allow adding domain(s) exclusively to a specific list
2020-11-28 16:25:38 +00:00
DL6ER
c8b85b8596
Use INSERT OR IGNORE instead of REPLACE
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-11-10 21:26:01 +01:00
DL6ER
ad43e5a8dc
Add missing space and extend error hiding timeout from 4 to 10 seconds.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-11-09 21:21:30 +01:00
DL6ER
4557846858
Use JOIN instead of nested SELECT
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
Co-authored-by: Adam Warner <me@adamwarner.co.uk >
2020-11-09 21:17:26 +01:00
DL6ER
f5a39ce1e4
Check if replacing the domain messes with existing special groups settings. Don't change it but show a warning if this is the case.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-11-08 22:52:03 +01:00
DL6ER
90c9ebc54b
Ensure empty clients/groups/adlists/audits cannot be added
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-11-08 22:06:30 +01:00
DL6ER
0e924fd910
Add new replace_domain action in groups.php to allow adding domain(s) exclusively to a specific list. In this mode, any occurrences of said domain are first removed from the list before adding the new ones.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-11-08 18:51:49 +01:00
DL6ER
1b129bcad0
Merge branch 'release/v5.2' into new/mac_clients
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-07-30 21:56:21 +02:00
DL6ER
fdea341c9f
Fix audit log button doing nothing (resp. wrongthing)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-07-20 22:04:59 +02:00
Adam Warner
c949516ee1
make use of utils.escapeHtml on the JS side of things, and html_entity_decode/htmlentities in PHP
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-06-13 18:50:36 +01:00
Adam Warner
5b71dab0c7
Change INSERT statement to INSERT OR IGNORE on adlist management as a workaround for now
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-06-06 18:27:22 +01:00
DL6ER
a901489a96
Merge branch 'devel' into new/mac_clients
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-06-05 22:24:17 +02:00
Adam Warner
efd9281fa4
Merge pull request #1442 from pi-hole/fix/null_comments_in_groups
...
Store NULL for empty descriptions and comments in the groups database tables
2020-06-05 19:17:57 +01:00
Adam Warner
7aa79a7a77
Merge pull request #1420 from pi-hole/tweak/improve_warnings
...
Improve messages on the domain management pages
2020-06-05 19:17:17 +01:00
DL6ER
a7bc6e8999
Store NULL for emtpty descriptions and comments in the groups database tables.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-06-05 11:53:10 +02:00
Adam Warner
981cba14f2
Use PHP builtin to split the input by space. Automatically takes into account " chars
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-06-03 16:50:33 +01:00
DL6ER
580149e91f
Merge pull request #1292 from pi-hole/tweak/group_name_separators
...
Allow spaces in groups when wrapping names in "..."
2020-06-02 13:43:49 +02:00
DL6ER
332cff1d36
Improve warnings on the domain management pages.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-06-02 11:37:23 +02:00
Adam Warner
7700d9b44a
Merge pull request #1387 from pi-hole/new/api_add_sub_get_lists
...
(Re-)Add API endpoints for list manipulations
2020-05-29 23:30:40 +01:00
DL6ER
cce92ccde4
Remove obsolete add.php script, use groups.php everywhere instead.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-26 23:07:20 +02:00
Adam Warner
c2a634f80f
Allow for ; in adlist urls
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-26 20:58:18 +01:00
DL6ER
2fac217943
Re-implement api.php?list actions for add, sub and get.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-26 18:40:33 +02:00
DL6ER
090e55ef99
Use host names stored in the network_addresses table when querying new client suggestions.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-18 14:29:41 +02:00
DL6ER
dca347c056
Fix missing separator when there is vendor and address but no hostname
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-15 18:44:12 +02:00
DL6ER
7a5235512b
Order suggested clients by firstSeen (most recent on top).
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-15 18:44:11 +02:00
DL6ER
f7647c9c6d
Show hostname(s) first, then MAC vendor (if applicable) and then IP address(es).
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-15 00:00:36 +02:00
DL6ER
29e048824e
Ensure we're not adding IPs for mock devices.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-14 23:58:24 +02:00
DL6ER
389f1d1ecd
Fix failed git auto-merge.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-14 20:29:42 +02:00
DL6ER
8a794bf9aa
Also show IP addresses in MAC details
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-14 20:13:49 +02:00
DL6ER
fe10059517
Finalize sub-queries to ensure we're not running out of memory with hundreds of clients (can result in O(N^2) memory requirements).
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-14 18:43:35 +02:00
DL6ER
8c53844ef3
Add device vendor (if available) to info string shown in the select dropdown
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-14 18:43:35 +02:00
DL6ER
3e1a1f59aa
Add support for multiple hostnames per client (hardware address).
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-14 18:43:35 +02:00
DL6ER
402e56e054
Allow adding groups with spaces in them when wrapping groups names in quotation marks.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-14 18:04:31 +02:00
Adam Warner
ef13e69125
Use REPLACE into instead of INSERT into. This allows for a domain's white/blacklist status to be toggled
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-13 22:01:58 +01:00
DL6ER
68b99658ad
Ensure IP addresses w/o MAC addresses are also shown and that already added clients are hidden.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-13 22:59:28 +02:00
DL6ER
bdca8104e5
Add better select menu allowing users to filter inside the dropdown as well as add new entries in place.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-13 21:19:05 +02:00
DL6ER
73ee91a024
Merge branch 'master' into master-to-development-v5.0
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-05-10 22:00:07 +02:00
DL6ER
81a2932f6a
Merge branch 'release/v5.0' into tweak/trim_domains_input
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-04-28 21:12:45 +02:00
DL6ER
4889350038
Merge branch 'release/v5.0' into tweak/trim_domains_input
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-04-28 17:30:13 +00:00
DL6ER
84046528bf
Allow ( and ) in adlist URLs.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-04-26 09:31:45 +02:00
DL6ER
f17b216b6b
As of ICU 55.1 (released 2015-04-01) the IDNA2003 APIs are deprecated, because UTS #46 should be preferred over the obsolete IDNA 2003 variant. Implement this change. Fixes #1223
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-04-25 07:02:37 +02:00
DL6ER
77b421b133
Show how many domains have been added in case of an error.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-04-23 13:47:50 +02:00
DL6ER
7d1163ff9c
Try to be clearer with the "failed to add domain" message by showing the original input when idn_to_ascii() failed and by showing both, the original and the converted domain when the conversion result itself is invalid.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-04-23 11:39:57 +02:00
DL6ER
14dd1350df
Strip whitespaces from the beginning and end of user input to prevent errors getting triggered due to users trying to add "empty" domains.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-04-23 11:27:24 +02:00
Samu Voutilainen
39ec67829b
Execute pihole through wrapper
...
All different exec() calls basically just calls sudo pihole,
with various different syntaxes. Using a wrapper function
allows sanitization of arguments for better safety.
Signed-off-by: Samu Voutilainen <smar@smar.fi >
2020-04-17 07:55:16 +03:00
DL6ER
57e139bcba
Merge branch 'release/v5.0' into new/space-separated-item-injection
2020-03-31 21:31:41 +00:00
DL6ER
f0034b305d
Check adlist URL for valid characters before adding record to the database.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-03-31 20:41:50 +00:00
Dan Schaper
aa51f014ab
Fix domain and group disassociation when toggling from Black/Whitelis… ( #1172 )
...
* Fix domain and group disassociation when toggling from Black/Whitelist page
* Properly set the groups variable
Signed-off-by: trillaxe <trillax@tutanota.com >
* Trim whitespace
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net >
2020-03-05 12:59:42 -08:00
DL6ER
59085c237e
Merge branch 'release/v5.0' into new/clients_comment_fields
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-02-18 16:44:12 +01:00
DL6ER
7274b9bca7
Only use IDN subroutines when the module is available. We have seen reports that at least DietPi is having issues with not matching PHP base and extension versions.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-02-16 21:16:06 +01:00