Commit Graph

515 Commits

Author SHA1 Message Date
DL6ER
7c9f09db0e Directly write imported regex file to disk instead of useing bash callbacks
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-07-15 12:56:40 +02: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
DL6ER
65d0c7a1d9 Also try to import legacy wildcard list if found in imported teleporter archive
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-07-14 22:25:17 +02:00
DL6ER
e67695d51a Add files backed up from /etc/dnsmasq.d into a separate directory to tidy up the generated archive
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-07-14 15:46:22 +02:00
DL6ER
ed8dbfd10e Show number of processed items when importing whitelist, blacklist, and regex filters
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-07-14 15:34:42 +02:00
DL6ER
50885d092a Import regex.list if requested. Don't check validity of regex filters as they are not necessarily in valid domain format
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-07-14 15:33:52 +02:00
DL6ER
6dc8bf300c Export regex.list
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-07-14 15:27:54 +02:00
Mcat12
fbe9516cbe Fix incorrect regex removal code
If you had these in the regex list:
- example\.com
- example
- ^example.*

And you removed "example", then the list would look like this:
- \.com
- ^.*

This behavior is fixed.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-08 16:27:38 -04:00
Mcat12
2759ec0da5 Add missing break statements
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-06-30 15:18:13 -04:00
DL6ER
e8b2cbe698 Tag regex filters as "regex" to avoid the domain validation (otherwise regex lines could not get removed). Also ensure that deleting the first wildcard/regex does not hide the first exact blocking domain (this bug has been in since the very beginning of wildcard blocking)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-06-30 14:42:52 +02: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
Mcat12
aef5f7c7ce Keep trailing newline in regex file after removal
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-06-28 23:16:11 -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
3f7246968e Review comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-06-17 20:01:46 +02:00
DL6ER
36930e3834 Add regex support on the web interface
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-06-05 10:35:41 +02:00
Rob Gill
96039f52a5 fix typo in cookie check
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-01 09:52:07 +10:00
Mark Drobnak
523b4c390d Merge pull request #522 from Th3M3/clean_up_style-rules
Clean up style rules
2018-05-29 18:16:31 -04:00
Kevin Kirsche
49d6feb4c3 Fix 579 | Add interface option for administrator email address (Redo of #757)
Signed-off-by: Kevin Kirsche <Kev.Kirsche@gmail.com>
2018-05-26 23:17:17 -04:00
DL6ER
c8f0db326b Remove ancient and completely outdated PHP-only API. Pi-hole v4.0 will only use the FTL-PHP API.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-05-24 14:06:46 +02:00
Mark Drobnak
32c55577f1 Remove max line length in getResponseFTL
Fixes issue found on Discourse: https://discourse.pi-hole.net/t/9544

Signed-off-by: Mark Drobnak <newtoncat12@yahoo.com>
2018-05-16 11:27:54 -04:00
Mark Drobnak
fc795e3b10 Merge pull request #743 from rrobgill/cookielogin
Persistent login cookie
2018-05-14 21:03:16 -04:00
Rob Gill
967763b6da indenting
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-15 10:56:49 +10:00
Rob Gill
30bef67a88 indenting
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-15 10:55:46 +10:00
Rob Gill
c2a9e80db6 indenting
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-15 09:05:19 +10:00
Rob Gill
72e95cec96 indenting
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-15 09:03:09 +10:00
Rob Gill
7a3fc169a5 Update password.php 2018-05-10 09:14:57 +10:00
Rob Gill
5733d08745 Remove invalid cookie
If cookie is invalid, it is cleared from the browser before continuing
2018-05-10 08:54:44 +10:00
Rob Gill
adeec42dd4 relocate checkbox
Persistent login checkbox moved from form feedback.
2018-05-09 08:31:34 +10:00
Rob Gill
8eed0e09d9 Update loginpage.php 2018-05-08 19:05:42 +10:00
Rob Gill
a8bf42687c Update password.php 2018-05-08 19:05:19 +10:00
rrobgill
84b6f6b291 Update password.php 2018-05-08 17:24:11 +10:00
rrobgill
d64292ba5c Update loginpage.php 2018-05-08 17:24:09 +10:00
rrobgill
fb988f247d Cookie login
Allow user to (optionally) set a cookie for automatic login.

UI addition of checkbox and informs user of option to store a cookie.
2018-05-05 14:45:04 +10:00
rrobgill
85dd92771a Cookie login
Allow user to (optionally) set a cookie for automatic login.
Expiry is set for 7 days.
Cookie refreshes, extending for 7 days from each use.
2018-05-05 14:42:04 +10:00
DL6ER
bd25557469 Remove last traces of local custom port settings
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-05-04 22:11:50 +02:00
DL6ER
dd96847cc5 Remove local DNS with custom port field as it is superseeded by the more powerful custom 1/2/3/4 implementation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-05-04 19:16:55 +02:00
DL6ER
6d8c3de5ba Support custom ports in the custom DNS server tab on the settings page
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-05-04 19:14:31 +02:00
Mark Drobnak
d2a20b1f0c Merge pull request #735 from walter-exit/devel
Gravity: date last changed (Web & API)
2018-05-02 14:28:20 -04:00
Walter
967216ca74 Signed-off-by: Walter <walter@exclusive-it.nl> 2018-05-02 20:12:15 +02:00
Walter
49190f8a62 Changed indentation from all tabs to all spaces (misread preference, my bad) 2018-05-02 11:07:28 +02:00
Walter
983966da04 Changed indentation from spaces and tabs to only tabs 2018-05-02 11:01:38 +02:00
Florian Ströger
2c7b6c07c6 Added "Raw API Token:"
As requested
2018-04-29 10:17:10 +02:00
Florian Ströger
45fbdae34b Add API Token in Text 2018-04-26 20:04:54 +02:00
Walter
2c2a091b03 Changes concerning the date the gravity list was last changed. Used in the webinterface dashboard as a tooltip, and now also available in the API (both PHP and FTL). Function was moved to new file /scripts/pi-hole/php/gravity.php to keep things neat and to avoid duplicate code. 2018-04-23 20:32:38 +02:00
DL6ER
4c91d65547 Make sure backend does always interpret list of DNS servers even if it is empty
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-04-19 07:38:34 +02:00
DL6ER
847d6aae53 Improve code as suggested
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-04-18 21:49:35 +02:00
DL6ER
7fa6cd85d3 Be less specific, as this feature can be used for any time of local resolver running on a custom port
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-04-18 17:31:16 +02:00