Bug #6175
closedfirewall_rules_edit possible php warning - floating rules when input error
100%
Updated by jeroen van breedam over 8 years ago
Updated by Jim Pingle over 8 years ago
- Category set to Rules / NAT
- Status changed from New to Feedback
- Assignee deleted (
Jim Pingle) - Target version deleted (
2.3.1)
See the thread. I can't reproduce it as-is. Needs more info before a ticket can be opened or a fix pursued, we have to be able to reproduce it to confirm it's fixed.
Updated by jeroen van breedam over 8 years ago
i've just updated the thread after creating this ticket.
Updated by Jim Thompson over 8 years ago
- Assignee set to Anonymous
- Target version set to 2.3.1
- Affected Version set to 2.3
Updated by Jorge M. Oliveira over 8 years ago
I wonder if this is as easy as
--- src/usr/local/www/firewall_rules_edit.php +++ src/usr/local/www/firewall_rules_edit.php @@ -194,7 +194,7 @@ if (isset($a_filter[$id]['floating']) || $if == "FloatingRules") { $pconfig['floating'] = $a_filter[$id]['floating']; if (isset($a_filter[$id]['interface']) && $a_filter[$id]['interface'] <> "") { - $pconfig['interface'] = $a_filter[$id]['interface']; + $pconfig['interface'] = explode(",", $a_filter[$id]['interface']); } } @@ -1205,7 +1205,7 @@ $section->addInput($input = new Form_Select( 'interface', 'Interface', - explode(",", $pconfig['interface']), + $pconfig['interface'], build_if_list(), true ))->setHelp('Choose the interface(s) for this rule.');
This will place the explode() call in a more appropriate place and hopefully do the trick.
Updated by jeroen van breedam over 8 years ago
Jorge M. Oliveira wrote:
I wonder if this is as easy as
[...]This will place the explode() call in a more appropriate place and hopefully do the trick.
maybe, i'm not much of a coder & haven't tried your patch. i assume you have ;)
i put it below firewall_rules_edit.php#L441 because there $pconfig gets overwritten by $_post. (does $pconfig['interfaces'] survive?)
Updated by Anonymous over 8 years ago
- Assignee changed from Anonymous to jeroen van breedam
Change suggested by Jorge M. Oliveira was found to be effective and has been merged.
Thanks Jeroen and Jorge.
Since this issue is difficult to reproduce, please confirm that the fix was effective.
Updated by jeroen van breedam over 8 years ago
seems fixed after gitsync. thanks all
Updated by Anonymous over 8 years ago
- % Done changed from 0 to 100
Applied in changeset 8d13b6753c2b024002d3bbbd222cea33045c9741.