Commit Graph

29 Commits

Author SHA1 Message Date
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
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
Adam Warner
c53436ab3f Also do this from the query log page
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-13 23:38:43 +01:00
DL6ER
1300b5411a Fix audit log page.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-21 19:11:17 +01:00
DL6ER
6ad2430f95 Import legacy adlist.list and fix/remove debugging output
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-02 19:10:26 +01:00
DL6ER
95c893ded5 Merge branch 'devel' into new/group-management 2019-12-16 10:28:36 +00:00
DL6ER
600c16c269 Add Client group management
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 14:40:29 +00:00
DL6ER
59cdd7e148 Remove debug output.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-08 23:01:02 +00:00
DL6ER
a42b5b38cf Reinstall lost database query instruction.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-08 23:00:38 +00:00
Adam Warner
258ea04432 Add a class for better readability of list type within the code
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2019-12-08 18:47:30 +00:00
DL6ER
3a0a596b11 Implement necessary changes due to switching from individual to a common domainlist.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-08 17:42:01 +00:00
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
d42180d2be Pass possible exception from SQLite3_connect_try() to the calling process. This makes this function return either valid SQLite3 objects (success) or strings (errors). We can pass the errors to the user interface to help user helping themselves.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-02 21:34:39 +02:00
DL6ER
d97c85f724 Slightly change the message shown when domains are duplicates.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-29 17:26:32 +02:00
DL6ER
50e5349ee4 If some domains are not added, then this happened because they are duplicates. Highlight this in the success message.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-29 16:53:00 +02:00
DL6ER
fcc49e3928 Wrap addition and removal of domains in a transaction + deliver a more detailed success message to the user specifying how many domains are actually added (in case some already existed).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-27 19:26:51 +02:00
DL6ER
d101465c62 Pass through errors to user interface
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-27 18:53:10 +02:00
DL6ER
4743228a86 Allow domains to be added by hitting return (add them as exact domains).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-27 17:19:05 +02:00
DL6ER
e66d0c4a74 Limit maximum length of each domain to 253 characters. We should document this somewhere if power users want to add insanely long regex filters, they will have to do this by directly interacting with the database.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 22:25:17 +02: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
3770556732 Use database.php:add_to_table() in teleporter.php:archive_insert_into_table().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:49:51 +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
d568b49fb1 Add busy timeout so adding/removing domains does not immediately fail in case the database is busy.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:24:05 +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
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
ced7174c37 Modify adlists subpage of the settings page to sources the lists from the gravity database.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-04-28 20:42:50 +02:00
DL6ER
406a946b24 Add new file scripts/pi-hole/php/database.php
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-04-26 18:32:33 +02:00