Pi-hole-Folge-Fixes: konfigurierbarer Top-Clients-count + Session-Invalidierung beim User-Löschen - #197
Merged
Merged
Conversation
… for attribution)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zwei unabhängige, dokumentierte Folge-Fixes der Initiative „Pi-hole im Portal" (TP1 #189 / TP2a #192 / TP2b #193). Ein PR, 6 Commits (nicht gesquasht).
Ticket A — konfigurierbarer Pi-hole-Top-Clients-Abruf
Die pro-Gerät- (TP2a) und pro-Besitzer-Aggregation (TP2b) summierten nur die Pi-hole-Top-Clients. Pi-hole liefert per Default Top-10 und der Sync cappte zusätzlich auf 10 → Geräte jenseits Platz 10 erschienen als
no_data. Neu: konfigurierbarer Abruf-Umfangtop_clients_count(Default 1000) macht die Attribution vollständig.getTopClients(blocked, count)hängtcountnur an, wennNumber.isInteger(count) && count > 0(back-compat ohne count).piholeConfig.DEFAULT.top_clients_count = 1000; PUT/settings/piholeclamptMath.max(1, Math.min(5000, parseInt(...) || 1000)).countexplizit durchpull(client, count)(kein Closure/shared state);.catch(() => [])auf dem blocked-Call erhalten. Beide Client-Listen cappen mitcount,topDomainsbleibt Top-10.GET /pihole/top-clientscappt die Anzeige auf 10 (.slice(0,10)nachscopeFilter);cache.topClientsbleibt voll für die portal.js-Attribution.#pihole-top-clients-countin allen 3 Themes (aurora/default/pro) + settings.js (populate/save/autosave) + i18n en+de.Ticket B — Session-Invalidierung beim User-Löschen
users.removelöschte den User + nullte den Peer-Besitz, invalidierte aber nicht dessen Sessions (gelöschte Person behielt bis ~24h TTL eine lebende Session). Neu:DELETE /users/:idruft nachusers.remove(id)route-level guardedreq.sessionStore.destroyByUserId(id)(außerhalb der Transaktion, keinexceptSid).users.removebleibt reiner DB-Service.Tests
10 neue Tests + 75 Regression lokal grün (
NODE_ENV=test,--test-force-exit), inkl.pihole_sync_v5_degrade/v6(.catch-/URL-Erhaltung). Finaler Whole-Branch-Review: ready to merge, 0 Critical/Important.Backlog (kein Security-Gap)
Verwaiste
api_tokens-Rows beim User-Löschen werden nicht bereinigt —users.isEnabledblockt Token-Auth gelöschter User implizit. Cleanup = separates Folgeticket.