-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luci-app-firewall: cannot choose Any zone
in Output zone
field | temporary fix found
#7591
Comments
Any zone
in Output zone
fieldAny zone
in Output zone
field | temporary fix found
Hmm. Evidently there remain edge cases for the widget. My guess is that the name with a space in it is the trigger here. Any suggestions @adelton ? |
@this-username-has-been-taken I wonder whether you can test whether the following works: datatype: L.hasSystemFeature('firewall4')
? ( this.multiple ? 'list(string)' : 'string' )
: this.multiple ? 'list(and(string,maxlength(11)))' : 'and(string,maxlength(11))', It's not ideal, but at least fixes this edge-case, I think (assuming |
@systemcrash , just checked: yes, that worked! But I don't remember if I was able to delete a chosen |
Delete? |
@systemcrash Is it expected that when I install OpenWrt 24.10.0-rc7 (r28417-daef29c75d) and upgrade all upgradable packages, giving me
that I don't reproduce that issue? In fact,
does not find anything. Does it mean we don't have a package which would contain #7564? I'm trying to establish a baseline for a reproducer (and a fix). |
I meant that when you open a new rule dialog the If you save a rule like this (with an empty value - not choosing anything) - the zone value will be set to |
@this-username-has-been-taken: Could you check the code in #7592? |
As for removing the selection completely after either a zone or Any zone has been selected: when I modify the code to drop the |
@adelton , I have just checked: the code from #7592 works! I'd suggest putting "else" part under parentheses too to make it look uniform, but that's not critical:
As per |
Your PR was merged to main (snapshots) but not to 24. I figured some edge-cases might still be lingering. |
Thank you very much for a quick fix!!! :) |
Is there an existing issue for this?
screenshots or captures
Hello!
I have just build and installed a fresh firmware from the
master
/main
branch and faced with an issue: I cannot add or modify a firewall rule and setOutput zone
toAny zone
: LuCI shows an error:Expecting: valid UCI identifier
. Please refer to the attached screenshot for more details.It is possible to modify the rule via editing the config file, but that's not very convenient.
I have searched the similar issues and found this: #7563
I believe my issue might be connected with it.
UPD - temporary fix:
Quick and dirty fix for a live system - thanks to @systemcrash post here: #7563 (comment)
nano /www/luci-static/resources/tools/widgets.js
datatype:L.hasSystemFeature('firewall4')?(this.multiple?'list(uciname)':'uciname'):this.multiple?'list(and(uciname,maxlength(11)))':'and(uciname,maxlength(11))',
Actual behaviour
When adding or modifying a firewall rule it is impossible to set
Output zone
field toAny zone
value. LuCI shows an error:Expecting: valid UCI identifier
.Expected behaviour
When adding or modifying a firewall rule it is possible to set
Output zone
field toAny zone
value. LuCI accepts the value and saves it in the config file without any errors.Steps to reproduce
master
/main
branch) firmware and install it.Output zone
field toAny zone
.Expecting: valid UCI identifier
error. It is impossible to save the ruleAdditional Information
What browsers do you see the problem on?
Firefox
Relevant log output
The text was updated successfully, but these errors were encountered: