webui: allow saving the firewall IP list with a trailing line break - #84
Merged
jens-maus merged 1 commit intoSep 30, 2026
Merged
Conversation
The firewall configuration dialog strips a trailing ";" from the list of allowed IP addresses before it removes all whitespace and splits the list. If the list ends with ";" followed by a line break, the ";" is not the last character, so it is kept. The split then produces an empty last entry, which fails the IP address validation, and the configuration cannot be saved. Trim the text first. This natively replaces OpenCCU rootfs patch 0102-WebUI-Fix-TrailingNewLineInFirewallIPTextarea.patch.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 35 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jens-maus
deleted the
jens-maus/migrate-0102-webui-firewall-ip-trailing-newline
branch
September 30, 2026 12:13
This was referenced Sep 30, 2026
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.
Original OpenCCU rootfs patch: 0102
Original filename:
0102-WebUI-Fix-TrailingNewLineInFirewallIPTextarea.patchOriginal patch:
''https://github.com/OpenCCU/OpenCCU/blob/7736adbdbe91d3e64ee678af07e86800c1b8a865/buildroot-external/package/openccu-base/rootfs-patches/0102-WebUI-Fix-TrailingNewLineInFirewallIPTextarea.patch''Original issue: OpenCCU/OpenCCU#1036 (fixed by OpenCCU/OpenCCU#1038)
When the firewall configuration dialog is saved,
ok()insrc/webui/www_source/webui/js/dialog/firewallconfigdialog.jsfirst strips a trailing;from the list of allowed IP addresses, then removes all whitespace and splits the list at;. If the list ends with;followed by a line break, the;is not the last character and is kept. The split then produces an empty last entry, which failsisIPAddressValid(), and the configuration cannot be saved. This trims the text before it is processed.The file's ISO-8859-1 encoding and CRLF line endings are preserved. It is part of the generated
www/webui/webui.js.32 earlier OpenCCU rootfs patches also modify the generated
www/webui/webui.js. None of their hunks covers this line, and the line count is unchanged, so they all still apply unchanged.Validation
scripts/base-patch-migration.py validatewith the canonical Buildroot 2026.08git4archive of this branch (d849b206, sha256efd58b4df54d8b29ebe0e079e429c40d11d134b031ad70047c16dc682dd2aa22) and--skip-patch 0102: PASS (the other 119 rootfs patches apply with zero fuzz).compareagainst the current pin baseline (c827595e, all 120 patches): IDENTICAL (4668 entries).OpenCCU cleanup PR (patch removal, pin and archive hash update): OpenCCU/OpenCCU#4282