Commit Graph

3590 Commits

Author SHA1 Message Date
DL6ER 0a971d39b8 Remove duplicates from client name suggestions
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-18 16:55:17 +02:00
DL6ER 5fdfeb9ef6 Add blocked domains in Query Log suggestions
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 12:14:06 +02:00
DL6ER bf1355c8ce Increase speed of the /api/stats/* endpoints by reducing the use of shared memory locks. This is possible at the costs of a few bytes extra memory (at most a few KB) as we collect all data only once and don't need to get object poiters twice.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 12:14:06 +02:00
DL6ER 94dceae419 Only add non-empty TOP replies
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 12:14:06 +02:00
DL6ER d01809a1a7 Sort only once for TOP clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 12:14:06 +02:00
DL6ER af7ea105eb Implement actual TOP suggestions for the Query Log
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 12:14:06 +02:00
yubiuser f12d14f339 Merge pull request #2010 from pi-hole/fix/rev-servers-crash
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Fix rev-server crash
2024-07-15 08:32:22 +02:00
DL6ER 00ff114cab Do not start threads in detached mode. Joining them may SEGFAULT with libmusl
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-09 18:58:55 +02:00
Dominik 5c97d29033 Merge pull request #2005 from pi-hole/tweak/api_warnings_debug
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Show Unauthorized warnings only in debug mode
2024-07-03 17:54:11 +02:00
DL6ER 73d5827e90 Log API warnings caused by send_json_error() only if debug.api is true
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-02 03:40:31 +02:00
DL6ER 1abf158431 Fix compile problem with Pogoplug, reported on Discourse
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-01 16:24:58 +02:00
DL6ER 10491f0b07 Query CLI property from database table
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-30 09:07:55 +02:00
DL6ER 9de4336858 Update expected database schema in CI tests
Build, Test, Deploy / smoke-tests (push) Waiting to run
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Blocked by required conditions
Codespell / spell-check (push) Waiting to run
Check for merge conflicts / merge-conflict (push) Waiting to run
API validation / Node (push) Waiting to run
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-30 08:14:35 +02:00
DL6ER 62acbce2cc Backup and restore CLI session property
Build, Test, Deploy / smoke-tests (push) Waiting to run
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Blocked by required conditions
Codespell / spell-check (push) Waiting to run
Check for merge conflicts / merge-conflict (push) Waiting to run
API validation / Node (push) Waiting to run
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-29 22:04:25 +02:00
DL6ER bc96decc04 Merge branch 'development-v6' into new/cli_pw
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-29 21:59:48 +02:00
DL6ER 630b3582f7 Merge branch 'development-v6' into new/cli_pw 2024-06-29 21:53:32 +02:00
DL6ER e0330a30a4 Merge branch 'development-v6' into new/app_sudo
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-29 21:52:34 +02:00
Dominik fbae3b9aca Merge pull request #1977 from pi-hole/new/ntp
Add NTP-server/client implementation
2024-06-29 21:48:25 +02:00
DL6ER 0278cc1593 Update condig item description as suggested during code review
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-29 09:01:38 +02:00
DL6ER 3f7d317b8a Check capabilities only when user requested updating time time
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-27 18:42:56 +02:00
DL6ER ec0e0c98bf Print database statistics after historic queries have been loaded from disk
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-27 16:36:02 +02:00
DL6ER 4e55268544 Clarify which server is used when invoked via CLI
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-27 16:34:54 +02:00
DL6ER 6eff0296b3 Check availablity of CAP_SYS_TIME when NTP client is invoked from CLI
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-27 16:33:16 +02:00
DL6ER 14e716729c Styling
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-26 10:21:12 +02:00
DL6ER 6d164a3529 Remove restarting step as queries are now loaded *after* NTP time synchronization
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-26 09:37:01 +02:00
DL6ER b3d72cb7b6 Load queries only after first NTP synchronization (if enabled)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-26 09:35:13 +02:00
DL6ER 5c2da0d074 Only use valid replies. Before, invalid replies would have contributed to the mean with a value of 0.0ms deviation, i.e., reducing any existing real time difference
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-26 09:04:18 +02:00
DL6ER 23ddd85837 Check if database is actually writable when we request this
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-26 08:49:55 +02:00
DL6ER f863c058d1 Update embedded LUA engine to 5.4.7
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 16:12:15 +02:00
DL6ER ab52ea063c Merge branch 'development-v6' into new/ntp
Build, Test, Deploy / smoke-tests (push) Waiting to run
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Blocked by required conditions
Codespell / spell-check (push) Waiting to run
Check for merge conflicts / merge-conflict (push) Waiting to run
API validation / Node (push) Waiting to run
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 15:13:37 +02:00
Dominik 96f7dff669 Merge pull request #1988 from pi-hole/new/misc_readOnly
Build, Test, Deploy / smoke-tests (push) Waiting to run
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Blocked by required conditions
Codespell / spell-check (push) Waiting to run
Check for merge conflicts / merge-conflict (push) Waiting to run
API validation / Node (push) Waiting to run
Add read-only config option
2024-06-25 14:32:13 +02:00
DL6ER b45695c3bd Restart FTL if system time has been updated by more than one hour using the internal NTP synchronization method. This ensures FTL can import the real most recent 24 hours data of history after a restart on a system lacking a real hardware clock
Build, Test, Deploy / smoke-tests (push) Waiting to run
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Blocked by required conditions
Codespell / spell-check (push) Waiting to run
Check for merge conflicts / merge-conflict (push) Waiting to run
API validation / Node (push) Waiting to run
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 10:03:28 +02:00
DL6ER 9e329be3ef Fix DNS-SD query analysis
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-21 19:32:26 +02:00
DL6ER 069cc309b0 Remove webserver.api.localAPIauth option
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:07:18 +02:00
DL6ER b74696fc77 Remove webserver.api.searchAPIauth option
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:05:49 +02:00
DL6ER 784e119892 Add CLI password generation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:01:13 +02:00
DL6ER 87dd091535 Fix crash caused by double free() corruption encountered with rev-server addresses with prefix lengths != {8,16,24,32}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-16 21:28:27 +02:00
DL6ER 0ed7f6dde1 Fix app status not being backed up correctly during FTL restarts
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-16 07:47:44 +02:00
Christian König b3182568a5 Fix API hint
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-06-15 13:16:37 +02:00
DL6ER 4f60134200 Improve config description of webserver.api.app_sudo
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-15 11:11:12 +02:00
Dominik d39480884d Apply code review
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Dominik <DL6ER@users.noreply.github.com>
2024-06-15 10:42:26 +02:00
Dominik 01c5c5629b Merge pull request #1994 from pi-hole/fix/env_password
Check if the newly set password is the same as the old one
2024-06-15 07:45:45 +02:00
DL6ER 950fc60ed3 Limit app password permissions by default. Add new app_sudo mode for users to remove this new limitation if they really need to
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-14 19:10:58 +02:00
DL6ER 5a6a212980 Add special handling for systems without password in the password checking short-circuiting
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-13 20:28:37 +02:00
DL6ER e05d931412 Spellchecking
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-13 06:31:44 +02:00
DL6ER 3ae3afa1b5 Fix harmless incorrect warning when generating HTML regex messages
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-13 06:30:43 +02:00
DL6ER e70c364af4 Add message table entries for selected NTP warnings/errors
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-13 06:26:28 +02:00
DL6ER 126d4d87ce Mark timer thread as running
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-12 18:21:46 +02:00
DL6ER 2516dcf3e2 Always join threads if they have ever been started to avoid resource leaking
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-11 04:23:52 +02:00
DL6ER 90ba90a0c7 Pre-define thread names so they can always be shown during shutdown, even if a thread was never started, remove unused CONF_READER thread slot
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-11 04:20:04 +02:00