Firewall panel advertises service-name rules the backend rejects #10
No reviewers
Labels
No labels
breadbug
bug
displays
enhancement
keybinds
network
phase-1
power
privacy
recovery
search
snapshots
sound
ui
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/bos-settings!10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bset-8-firewall-hint-port-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The Firewall panel's "Add rule" hint and input placeholder advertised service names (
a service name like "OpenSSH",port/proto or service name), butvalid_firewall_ruleinsrc/src/commands/firewall.rsis deliberately port-only (argv-safe, kept strict fromf7b114f) and rejects anything that is not a port with an optional protocol. Its own test asserts!valid_firewall_rule("OpenSSH"). A user who followed the UI hint and typedOpenSSHgot an "invalid firewall rule" error.This takes option 2 from the issue: make the UI copy honest about the current port-only behaviour rather than loosening the validator (which is a security-sensitive product decision, better handled as its own feature).
Changes
frontend/src/lib/views/Firewall.svelte: hint is nowA port, optionally with a protocol. e.g. "22", "8080/tcp", "53/udp".and the placeholder isport/proto, e.g. 8080/tcp.No backend change.
valid_firewall_ruleand its tests are unchanged and already match this copy.Verification
npm run build(frontend) passesnpm run check(svelte-check): 0 errors, 0 warningsCloses #9