Update Dev from main branch#141
Merged
Merged
Conversation
Improved language system, added catalan, added fail2ban-UI logo / favicon and updated tailwindcss
Rename some translations and fix logo-gab on left logo side
Revert license back to GPL-3.0
Bump version to v1.4.8
Add linux jq package as dependency
Implement local write-test for local managed files and use some delay for first time-local init
The dashboard's /api/summary handler enumerates every active jail and
returns the FULL banned-IP list for each. On hosts with large jails
(e.g. 4,500+ active bans on one jail across 17 active jails), this
single endpoint can take 3+ minutes to respond, exceeding any
reasonable HTTP gateway/proxy timeout (we hit a 60s ALB idle_timeout
default that returned 504). The dashboard renders only the first 5
IPs per jail by default (renderBannedIPs, maxVisible=5), so returning
a few hundred is more than enough for the UI's needs.
This patch caps BannedIPs per jail at 100 (configurable via the
FAIL2BAN_UI_SUMMARY_MAX_IPS env var; set to 0 to disable). The
accurate TotalBanned count is always preserved -- only the BannedIPs
slice is truncated.
Reproduction:
fail2ban-client status nginx-property-scraper # ~4500 banned IPs
curl http://localhost:8080/api/summary?serverId=local
# times out at >180s
After the patch (FAIL2BAN_UI_SUMMARY_MAX_IPS=100):
curl http://localhost:8080/api/summary?serverId=local
# responds in <1s, 100 IPs per jail, accurate TotalBanned
Trade-offs: a future user who actually wants the full IP list per jail
in /api/summary can opt out via FAIL2BAN_UI_SUMMARY_MAX_IPS=0. A
follow-up could expose the full list via a paginated /api/jails/:jail
endpoint, but that's out of scope for this fix.
Feat(lang)/i18n_ja
feat(api): cap banned IPs per jail in /api/summary response
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.
No description provided.