Commit Graph

1402 Commits (ebbb7168a4c288e61eac30da1c0fe3df71386b22)

Author SHA1 Message Date
DL6ER 23b3a9a650
Add DISTINCT to the view\'s SELECT queries to avoid domain duplication in case they are enabled in multiple groups at the same time.
5 years ago
Jeroen Baert 7b2ac25a52 Fix for 404 error when browsing to pi.hole (without /admin)
5 years ago
DL6ER f91421418a
Rename adlists -> adlist table.
5 years ago
DL6ER 3a14e8b013
Check whitelist_by_group.group_id instead of group.enabled against NULL.
5 years ago
DL6ER ad97e95f2f
Add required name column in group table.
5 years ago
DL6ER 5b01facd73
Fix logix on the views: AND ( OR )
5 years ago
DL6ER 6fe637b9ee
Rename groups -> group
5 years ago
DL6ER 94d83dbb2d
Unify the two group tables into a single "groups" table. This allows managing adlists and domains together.
5 years ago
Mark Drobnak c9a843b417
Merge pull request #2823 from pi-hole/fix/lighttpd-mime
5 years ago
DL6ER 87c115fc86
Change implementation to use linking tables (domain_groups, adlists_groups). This allows adding domains to multiple lists conveniently.
5 years ago
RamSet b5af125be6 Removed line
5 years ago
RamSet ecc49318f0 Fixed MIME related issue present in lighttpd/1.4.53
5 years ago
DL6ER 0774c4e5ca
vw_gravity should actually filter using vw_whitelist.
5 years ago
DL6ER 01850c2128
Automatically recreate standard group after deletion to avoid violating foreign key constraints even if foreign key enforcing is disabled (SQLite's default behavior)
5 years ago
DL6ER cbc210b014
Add adlist_groups and mark group_id columns as NOT NULL.
5 years ago
DL6ER c53ee4202b
Add filtering by domain groups to gravity database.
5 years ago
DL6ER 6996ffa451
Also flush network_addresses table
5 years ago
DL6ER 4947350ca5
Add arpflush to help and bash autocompletion
5 years ago
DL6ER c1495b0fa8
Merge branch 'development' into new/arp-flush
5 years ago
MMotti bcf03647ef Add comment and remove blankspace
5 years ago
MMotti a9d0690f4d Change the case of some variables
5 years ago
MMotti 10fbed50f3 Shellcheck
5 years ago
MMotti 785f1fedd9 Tidy regexp queries
5 years ago
MMotti cf21efa103 Minor grammar changes
5 years ago
MMotti 7613e94ef6 Minor tweaks
5 years ago
MMotti b49c702f33 Consistency tweak
5 years ago
MMotti 09532638d5 Read from DB instead of regex.list
5 years ago
MMotti 97df6d7415 Stickler fix
5 years ago
MMotti 54bfaa28c1 Fix for regexp queries through pihole -q
5 years ago
Mark Drobnak afd28fab03
Merge pull request #2767 from pi-hole/fix/multiple_pihole-FTL_PIDs
5 years ago
Mark Drobnak d92ced6fb6
Merge pull request #2734 from pi-hole/fix/query_black_and_whitelists_database
5 years ago
DL6ER ae98fde321
Try to obtain PID from PIDFILE. If this fails (file does not exist or is empty), fall back to using pidof + awk
5 years ago
DL6ER 9ddce88092
Review comments
5 years ago
DL6ER 44f8fcb600
We can print the table name without any extra check as we already returned early in case there are no results.
5 years ago
Mark Drobnak 814fdcf9b6
Merge pull request #2768 from pi-hole/fix/dhcp-ignore-names
5 years ago
DL6ER 5060605626
Print table name before entering the loop for the sake of simplicity
5 years ago
DL6ER 285e6fe090
Address lint complaints
5 years ago
DL6ER c3023fe681
Add new "pihole arpflush" command to flush both the ARP cache as well as the network table in pihole-FTL.db
5 years ago
DL6ER c5df104a66
Add dhcp-ignore-names option when enabling DHCP service. We currently remove anything that starts with "dhcp-" to have a clean configuration and removed these lines without noticing when enabling the DHCP server.
5 years ago
DL6ER f6213d4f4d
Use last PID in case pidof returns multiple PIDs for pihole-FTL
5 years ago
Mcat12 bfb99c361c
Note that the gravity size does not include the blacklist entries
5 years ago
Mcat12 5796054305
Increase ID column width to 4
5 years ago
Mcat12 a3e1473ac1
Set explicit column widths to prevent text from getting cut off
5 years ago
Mcat12 7b5fc60e00
Improve table formatting
5 years ago
Mcat12 807ce0af4e
Show whitelist, blacklist, and regexlist details
5 years ago
Mcat12 3f05efd60f
Add extra newline
5 years ago
Mcat12 03d93aa19a
Update debug script with gravity DB changes
5 years ago
Dan Schaper 7de6bbca61
Merge branch 'development' into release/v4.3
5 years ago
Mcat12 8e1bf6e3d4
Merge branch 'development' into new/gravitydb
5 years ago
mpiederiet 3220e2b978
Fix for preventing git error message in cron logs
5 years ago
DL6ER a904c183df
Use printf to escape domain content. This prevents possible SQL injection issues
5 years ago
DL6ER 5246b3e496
Explicitly escape backslash in ESCAPE clause. This has been suggested by Stickler bot.
5 years ago
DL6ER f80fdd7e83
Improve comments
5 years ago
DL6ER 6ba58896d2
Simplify code
5 years ago
DL6ER 3aa838bbe4
Implement black- and whitelist searching with SQL statements. We use the ESCAPE clause in the LIKE query as the underscore "_" wildcard matches any single character but we want to suppress this behavior (underscores can be legitimate part of domains)
5 years ago
Dan Schaper 5532df24e4
Pi-hole Debug - tricorder upload function calls
5 years ago
DL6ER 0bc112ce52
Query only those columns we actually use when showing domains on the CLI. Show date of last modification instead of addition date for domains.
5 years ago
DL6ER d46ff1d2d7
Remove UNIQUE on gravity table as the only column is already PRIMARY KEY. Primary keys must contain UNIQUE values, and cannot contain NULL values
5 years ago
DL6ER 2f698904e4
Use PRIMARY KEY instead of NOT NULL also in gravity and info tables
5 years ago
DL6ER 106f079afc
Improve indentation (single tab) in SQLite template
5 years ago
DL6ER 6c1e3a17f7
Remove NOT NULL constraint on list ids as this is implied by PRIMARY KEY (even though most, if not all, examples on the web still use both attributes at the same time)
5 years ago
DL6ER 5e26e8245b
Order results of queries to list views by id key
5 years ago
DL6ER 983117d788
Add id (primary key, autoincrement) field to lists tables
5 years ago
DL6ER b372f808dd
Fix lint errors
5 years ago
DL6ER bc9b623638
Modify query.sh to use the gravity database
5 years ago
DL6ER d5781fb110
Fix extra space in front on END statement in CREATE TRIGGER commands
5 years ago
DL6ER 487718512d
Remove DISTINCT attribute from views. They are not needed as the corresponding data is obtained from fields with UNIQUE attribute so duplications are already prevented at domain insertion. The elimination of the duplication check on imort through the views slightly reduces the load during import (I observed about 8 percent time saved on my NanoPi NEO).
5 years ago
pvogt09 8a92fb24c4 Incorporates changes requested by @Mcat12
5 years ago
pvogt09 5c575e73c7 Adds world readable attribute to files created by Pi-hole to circumvent #2724
5 years ago
DL6ER 2180531a84
Add trigger for automatic updates of the date_modified column and improve formating in the gravity.db template
5 years ago
Mark Drobnak 6812e8880e
Merge pull request #2705 from pi-hole/fix/chronometer-refresh-arg
5 years ago
DL6ER a932209143
Set default for date_modified to be the current time
5 years ago
DL6ER efeba594ae
Add support for manipulating adlists from the CLI
5 years ago
DL6ER 126f7101ff
Add (optional) date_modified field and use vw_whitelist view in vw_blacklist
5 years ago
Mcat12 b320e74921
Improve argument handling
5 years ago
Mcat12 add5e4ca5e
Explicitly allow only -r and --refresh in argument handler
5 years ago
DL6ER b4ae142149
Remove printf escaping (we will realize it differently) and ensure we're using single quotes for strings (although double quotes are possible, too)
5 years ago
DL6ER 3fe43ce1d9
Rely on default value (database provided) for date_added when adding a new domain
5 years ago
DL6ER e04dc9d2bb
Remove sqlitekey variable as the first column of the regex table is now called domain as well
5 years ago
DL6ER bd0215524b
Add vw_adlists view which returns only enabled adlists
5 years ago
DL6ER 5bb8163674
Change type of whitelist, blacklist, regex, and adlists time column to INTEGER and insert a DEFAULT clause that returns the current Unix time as such an integer
5 years ago
DL6ER a891d64395
We should always exit after displaying a list, even if it is empty
5 years ago
DL6ER 6b1d2523e8
Also print datetime a domain was added when listing the domains on the CLI
5 years ago
DL6ER 08ee9526ad
Review comments
5 years ago
DL6ER a2a7e80007
Add --web for sending a confirmation string when executed from the web interface. This is necessary as the "Reloading DNS service" message does not always propagate through to the web interface when reloading pihole-FTL takes a while.
5 years ago
DL6ER cce66a13b6
Fix output in list.sh when adding a domain that is already present in the target list
5 years ago
DL6ER 43bced7997
Add more comments
5 years ago
DL6ER 788cd78321
Reduce code duplication and add special handling of | character as it might appear in regex filter string
5 years ago
DL6ER e5d1cb5a2e
Rewrite list.sh to operate on database-based lists
5 years ago
DL6ER 61cfd2f9f9
Add adlists table
5 years ago
DL6ER ee4dabeca6
Merge branch 'development' into new/gravitydb
5 years ago
DL6ER de44563301
Remove addn-hosts from 01-pihole.conf
5 years ago
Mark Drobnak d2c7c426de
Fix teleporter backup file extension
5 years ago
DL6ER 84244b7cd5
Fix indentation in display of branches available during pihole checkout
5 years ago
Mcat12 422680ee9f
Fix chronometer refresh incorrectly reading the long argument sleep time
5 years ago
Adam Warner a7f6c9b3a0
Ignore matches that start `# ` using negative lookbehind
5 years ago
Mark Drobnak 204a4e459b
Merge pull request #2637 from TheNoim/patch-1
5 years ago
DL6ER 2e17c23333
Don't warn if user is on development as this branch is constantly updated
5 years ago
DL6ER 63f3381a2b
Warn user if FTL is not on branch master
5 years ago
Dan Schaper 71cd6c137b Use `curl` instead of `openssl` for transmission of unmodified
5 years ago
DL6ER 0e14d11a20
Merge branch 'development' into new/gravitydb
5 years ago
Adam Warner a145f1d931
Be more verbose with debug script output
5 years ago
Nils Bergmann cd9fadbc44
Remove protocol determination
5 years ago
DL6ER 5ca1bfc11c
Delete /dev/shm/FTL-* files on (re)start of pihole-FTL
5 years ago
DL6ER 644ec36e64
Review comments
5 years ago
DL6ER 9984647ebb
After renaming column in regex, it also needs to be renamed in vw_regex
5 years ago
DL6ER c3c60e10f1
Rename regex field from domain to filter because this described better what it is
5 years ago
DL6ER 8a2363621d
Rename fields from DateAdded to dateadded
5 years ago
DL6ER dbbf21071b
Invert logic to use ENABLED instead of DISABLED. We make sure to set "enabled = 1 WHERE enabled IS NULL" in gravity_store_in_database()
5 years ago
Mcat12 7a19d24058
Remove user/group from dnsmasq config
5 years ago
DL6ER 93f1859bab
Store regex in gravity.db as well
5 years ago
DL6ER dcf0a605cf
Use views for all tables and set disabled column to false for those tables that support it
5 years ago
DL6ER 710036adae
Add DISABLED field to white- and blacklist defaulting to false. The two views respect the DISABLED fields for both lists.
5 years ago
DL6ER 09c4c88a6d
Create and fill gravity.db during pihole -g
5 years ago
Mcat12 26f2410fe6
Change /var/run/shm to /dev/shm
5 years ago
Mcat12 5c4ee23795
Fix missed start_service -> restart_service call
5 years ago
DL6ER 87800a3659
Merge pull request #2570 from pi-hole/tweak/wpad
6 years ago
Mark Drobnak a3cee67a61
Merge pull request #2571 from pi-hole/tweak/debug/shm
6 years ago
DL6ER 5ffc8c7443
List content of /var/run/shm in debugger
6 years ago
DL6ER 04fd296ffe
Add wpad vulnerability fix as suggested by dnsmasq.conf.example
6 years ago
Mark Drobnak ed5869646f
Use source instead of dot for setupVars
6 years ago
Mcat12 be2d494fcf
Don't show web version in pihole -v output if not installed
6 years ago
Mcat12 1cad069050
Add privacy level 4 to all privacy level code
6 years ago
Dan Schaper 916b2920be
Merge pull request #2525 from pi-hole/release/v4.1
6 years ago
Dan Schaper 9f672593bc
Update advanced/Scripts/webpage.sh
6 years ago
DL6ER a285ae65fb
Backend changes for DHCPv4 rapid commit support
6 years ago
DL6ER d0125d5aad
Suppress warning if Pi-hole is not used as DHCP server (/etc/pihole/dhcp.leases is not present in this case)
6 years ago
Mcat12 9d59da8974
Remove dnsmasq checks from debugger
6 years ago
Mark Drobnak bbb759c684
Merge pull request #2477 from bcambl/debug_init_service_check
6 years ago
Mark Drobnak f1a7bc9ecd
Merge pull request #2481 from pi-hole/revert-2468-lighttpd-conf-enhancements
6 years ago
Dan Schaper a986f53134
Merge pull request #2436 from pi-hole/fix/password-read-error
6 years ago
Mcat12 28cbf45d1d
Add explanatory comment for include_shell
6 years ago
Dan Schaper 72829be281
Remove shellcheck overrides
6 years ago
Adam Warner d57f9906bd
read -r -a, not read -a -r
6 years ago
Adam Warner 3d4fea6510
Move -r to before the -p
6 years ago
Adam Warner f670644954
Revert "lighttpd conf enhancements"
6 years ago
bcambl 3ec84553ef fix debug service check via sysvinit
6 years ago
Mark Drobnak a301d4381f
Merge pull request #2472 from pi-hole/fix-webpwexpansion
6 years ago
Mark Drobnak 49b8ad7e94
Merge pull request #2470 from jeremysherriff/patch-1
6 years ago
WaLLy3K 180d29c7b3
Prevent BASH from expanding Web Password
6 years ago
Mark Drobnak a23ba91681
Merge pull request #2468 from gstrauss/lighttpd-conf-enhancements
6 years ago
jeremysherriff d3ac8bb6f8 Silence updateGravity job unless errors occur
6 years ago
Mark Drobnak f87f3b9199
Merge pull request #2467 from pi-hole/fix/dnsmasq-license
6 years ago
Glenn Strauss 67bdcbcf19 lighttpd: slightly more efficient sample config
6 years ago
Glenn Strauss 69b2a5a876 lighttpd: use file glob for optional external.conf
6 years ago
WaLLy3K 7f92671765
Update dnsmasq config license
6 years ago
Mark Drobnak 85dceb12a1
Use curl -s instead of -q
6 years ago
Mcat12 d55012f724
Append versions (after the first) instead of overwriting in updatecheck
6 years ago
Mcat12 7c6eecc9c8
Ignore shellcheck warning
6 years ago
Mcat12 e4cbf5023a
Fix error when reading in new password
6 years ago
Mark Drobnak 46356d3027
Merge pull request #2434 from pi-hole/fix/2200
6 years ago
Mark Drobnak 958a263437
Merge pull request #2431 from pi-hole/fix/use_PHP_comments_in_pihole-FTL.conf_template
6 years ago
Mark Drobnak a89ae82270
Merge pull request #2430 from pi-hole/chrono-lc-all
6 years ago
Mark Drobnak cedc39bf09
Merge pull request #2426 from mrmajik45/master
6 years ago
Adam Warner 0627e68078
Shellcheck is not a fan of sourcing scripts it does not know about. Add Directive to stop shellcheck from checking this.
6 years ago
Adam Warner 7d78f6314a
Source Setupvars file and only check local/remote Web branch/version if the web interface is installed.
6 years ago
mrmajik45 0f509f4a34
Update piholeDebug.sh
6 years ago
DL6ER b043000044
Improve template by removing it. PHP cannot digest comments starting in "#" as of v7.0.0
6 years ago
DL6ER c338eab3c6
According to the PHP documentation, PHP 7.0.0+ does not longer recognize hash marks (#) as comments. As FTL has been trained to understand PHP-style (comment lines start with ";") as well, we switch to using them.
6 years ago
WaLLy3K 24e1dc92ba
Resolve issue #2428
6 years ago
mrmajik45 00f98543ad
read without -r will mangle backslashes.
6 years ago
mrmajik45 8684356b44
read without -r will mangle backslashes.
6 years ago
Mark Drobnak dac27f1f18
Only get the first gateway for chronometer
6 years ago
Mark Drobnak 6f276ae4bb
Merge pull request #2299 from nullr0ute/net-tools
6 years ago
Mark Drobnak ec29829550
Merge pull request #2388 from Sh4d1/ipv6_brackets
6 years ago
DL6ER 40656641b6
Merge branch 'development' into tweak/reload_on_enable_disable
6 years ago
DL6ER 45bf4b02e7
Ensure that when pihole-FTL is launched as user root, it will drop permissions as soon as this is possible. We tell pihole-FTL to change UID/GID to pihole:pihole instead of the default nobody:nogroup. This default causes conflicts with our SQLite3 database. See that corresponding pull request for further details.
6 years ago
Patrik Cyvoct 85cf98888d
Merge remote-tracking branch 'origin/development' into ipv6_brackets
6 years ago
Patrik Cyvoct 048e5bb9a2
Remove external ipv6 brackets if any in servername
6 years ago
DL6ER b9d47d0dd2
Merge pull request #2378 from pi-hole/fix/pihole-FTL-no-caps
6 years ago
DL6ER 940c9c3bae
Merge pull request #2383 from pi-hole/feature/privacy-level-4
6 years ago
Mcat12 f141b9f778
Add support for privacy level 4
6 years ago
DL6ER 1dca1efbc6
Don't use extra query logging
6 years ago
DL6ER ec2426b24d
Add clarifying comments
6 years ago
DL6ER 5cd3b11391
Start pihole-FTL as root if capabilities are not supported by the system
6 years ago
DL6ER d30b565d98
Touch dhcp.leases to ensure it exists. There are some systems out there where the installer didn't finish on the first run and some users don't have this file being created. Although /etc/pihole should be owned by pihole:pihole, pihole-FTL sometimes fails to open this file and - if this is the case and DHCP is enabled - refuses to start altogether.
6 years ago
DL6ER ca309d3b28
Restart pihole-FTL after log flushing to force reloading history. Fixes #2339
6 years ago
DL6ER 165affc39b
list.sh writes into blacklist.txt not black.list so does not need to account for a possibly changed list location
6 years ago
DL6ER f794018e0c
Acknowledge temporary file if disabled for "pihole -b" command
6 years ago
DL6ER 94e4ed6644
Add facility to add multiple audit list entries at once and to nuke audit list
6 years ago
WaLLy3K eef948d797
Fix header newlines
6 years ago
Mcat12 e4e22fb58e
Fix permissive regex
6 years ago
Mcat12 7086a400e8
Use simpler regex format for wildcards
6 years ago
Dan Schaper af2ec61965
Convert [] to ()
6 years ago
Dan Schaper 94b7c8eb59
Added header for file. Not using standard Pi-hole copyright header.
6 years ago
Dan Schaper f2c675cff6
Formatted pihole-FTL.conf for readability.
6 years ago
Dan Schaper b79ff05e29
Move template files to own subdir. Include pihole-FTL.conf in templates.
6 years ago
Adam Warner 9b1356ad01
Revert #2282
6 years ago
Peter Robinson 45521b377a Use ip route rather than old net-tools route in chronometer.sh
6 years ago
Mcat12 03e5a78d8f
Merge remote-tracking branch 'origin/FTLDNS' into development
6 years ago
Dan Schaper ba7782f867
Space/Tab piholeDebug.sh
6 years ago
Dan Schaper c5091b0e49
Space/Tab wildcard_regex_converter.sh
6 years ago
Dan Schaper b54e32f0ca
Space/Tab webpage.sh
6 years ago
Dan Schaper 328e7738d5
Space/Tab version.sh
6 years ago
Dan Schaper aca359c2e2
Space/Tab updatecheck.sh
6 years ago
Dan Schaper 1cd40dc9e5
Space/Tab update.sh
6 years ago
Dan Schaper dc9407281f
Space/Tab setupLCD.sh
6 years ago
Dan Schaper 8f727c1f35
Space/Tab query.sh
6 years ago
Dan Schaper a08ea28feb
Space/Tab piholeLogFlush.sh
6 years ago
Dan Schaper c5535dd9a0
Space/Tab piholeCheckout.sh
6 years ago