summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #7625Steve Beaver2017-08-111-3/+14
| | | | | | | By: Separating the source and destination onChange functions Preventing the mask selector from being automatically updated if it is disabled Simplifying the auto mask JavaScript
* Fix VLAN Priority set pf syntax. Fixes #7744jim-p2017-08-011-1/+10
|
* Make consistent rule information sectionPhil Davis2017-05-191-28/+2
|
* Add underscores to is_port* function namesPhil Davis2017-03-271-4/+4
|
* Add reason to write_config() calldoktornotor2017-03-211-1/+1
|
* Merge pull request #3457 from stilez/patch-38jim-p2017-03-151-11/+29
|\
| * More sanitising of ipprotocol and other input fieldsstilez2017-02-011-11/+29
| | | | | | | | | | | | | | | | | | $_POST['ipprotocol'] needs a bit more sanitising. Some conditions test if it's a zero-length string, other conditions test if it's set/unset. Moreover ipprotocol is used to test and set valid values on other fields, so an invalid value on $_POST['ipprotocol'] has knock-on effects for other field validation that aren't trapped (although an invalid ipprotocol itself, is trapped), and a few places test it redundantly (for example if !$input_errors[] then ipprotocol must have been both set and valid, so no need to test isset()). A few other minor form fields should be sanity-checked before being relied upon as valid. Needs checking if any are missed. Last, $_POST['interface'] isn't validated, but I'm not sure what the correct validation expression would be for it, and the correct handling if !input_errors (see also the FIXME at line ~ 780)
* | Do not enforce a max limit on state timeout when editing a firewall rule. ↵jim-p2017-03-061-1/+1
| | | | | | | | Fixes #7356
* | Merge pull request #3570 from phil-davis/fw-rule-desc-7294Renato Botelho2017-03-021-2/+5
|\ \
| * | Fix 7294 keep full rule descriptionPhil Davis2017-02-221-2/+5
| | | | | | | | | | | | Signed-off-by: Phil Davis <phil.davis@inf.org>
* | | Fix #7300 provide default value for ipprotocol for old rulesPhil Davis2017-02-231-0/+2
|/ /
* | Revisions to GET/POST conversion limiting POSTs to save, apply, and delete ↵Steve Beaver2017-02-131-12/+16
| | | | | | | | functions - Firewall
* | GET/POST conversion firewall_rulesSteve Beaver2017-02-101-15/+9
| | | | | | | | guiconfig.php display_top_tabs supports "usepost" as an optional 4th argument
* | Merge pull request #3478 from phil-davis/sethelp-review2Renato Botelho2017-02-061-14/+20
|\ \
| * | setHelp and gettext changes for firewall* pagesPhil Davis2017-02-051-14/+20
| | |
* | | Firewall Rules Edit translate Source and DestinationPhil Davis2017-02-051-2/+2
|/ / | | | | | | | | | | | | | | | | | | These bits were not translating. Line 1406 could possibly be like: ``` $group = new Form_Group($name . ' ' . gettext('Port Range')); ``` But then that assumes that in every target language the translation of "Source" or "Destination" can be put in front of the translation of "Port Range". So I have given the translators both full phrases to do what they like with.
* | Several more fixes for setHelp to assist with translationSteve Beaver2017-02-031-1/+1
| |
* | Remove unneeded sprintf from setHelp callsSteve Beaver2017-02-021-1/+1
|/
* Fixed #7171Steve Beaver2017-01-301-4/+0
| | | | Moved setHelpText() to helpers file
* Required fields for firewall*.phpPhil Davis2017-01-241-7/+7
|
* Breadcrumb linksPhil Davis2017-01-101-0/+9
|
* Merge pull request #3329 from phil-davis/patch-1Renato Botelho2017-01-041-1/+1
|\
| * firewall_rules_edit stop Floating field displayingPhil Davis2016-12-311-1/+1
| | | | | | | | Seems to fix https://redmine.pfsense.org/issues/7057 But I have not looked underneath the hood - just copied the way other hidden fields are done in that code.
* | Merge pull request #3334 from phil-davis/patch-2Renato Botelho2017-01-021-0/+6
|\ \
| * | Fix #7059 Set expected icmptypes formatPhil Davis2017-01-011-0/+6
| |/ | | | | icmptype is a comma-separated list in the config. When attempting to save, the array in $_POST['icmptype'] needs to be put into this format in $pconfig in case there are input errors and the user-entered data need to be re-displayed for correction.
* | Merge pull request #3336 from phil-davis/patch-4Renato Botelho2017-01-021-2/+2
|\ \
| * | Remove redundant gettext() in firewall_rules_editPhil Davis2017-01-011-2/+2
| |/ | | | | The 'helpmsg' here is already translated with gettext() when the 'helpmsg' array entries are set up, so IMHO there is no need to attempt translation again.
* | firewall_rules_edit whitespacePhil Davis2017-01-011-7/+7
|/
* Merge pull request #3325 from stilez/patch-51Renato Botelho2016-12-301-1/+2
|\
| * capitalise "Any"stilez2016-12-291-1/+1
| |
| * "Any" moved to top of list in new blank rulesstilez2016-12-291-1/+2
| | | | | | | | | | @jim-p wanted this split out from PR 3159 as it wasn't related to that PR. Puts "any" at the logical place people look for it (top of list not 2/3 down it at random) while ensuring that for new rules default is tcp and extra ports etc fields are visible.
* | Merge pull request #3139 from stilez/patch-38Renato Botelho2016-12-301-64/+130
|\ \ | |/ |/|
| * Remove and replace white spacesstilez2016-12-281-4/+4
| | | | | | Safari doesn't seem to have editing issues (or else they very quickly fixed it). Removed all white spaces and re-entered, hopefully this fixes any incorrect extraneous characters that existed? If not you'll have to let me know where exactly they are.
| * Put back "any" in same place it came from in dropdownstilez2016-12-281-1/+1
| |
| * revert protocol order change (unrelated to PR)stilez2016-12-281-2/+1
| | | | | | Will pu in separate PR afterwards as requested
| * Data sanitation - check IP protocol in form datastilez2016-12-271-0/+4
| | | | | | Code doesn't seem to check that IP protocol is valid (IPv4/6/4+6) or report via $input_errors[] if not. Simple fix. Only spotted recently. Should be fixed whatever else?
| * Alternate fix for jim-p's point that seems to resolve everything neatlystilez2016-12-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | @jim-p commented on the PR that: > This change is unwarranted. The protocol default should remain TCP, it is set that way on purpose (otherwise people get confused by the lack of port options being visible). It's also not relevant to the other changes being made on this PR. An alternate fix for jim-p's point. this only affects creating new rules and I take the point. I found this a much better fix (AFAICS). It seems to resolve all issues neatly. Proposed fix: leave "any" at the top of the list as that's the logical place people almost always look for it if they want it, _but set the default proto to tcp for new rules_ so that ports and other expected items are displayed by default too. After all, the default protocol is only relevant for showing tcp and ports fields, when a new blank rule is created (obvious: if the rule exists it would display the protocol in the existing rule). @jim-p can you try this as a fix, and see if it would be acceptable for resolving your point?
| * Fix the Safari issue mentioned by @gargaJared Dillard2016-12-151-1/+7
| | | | | | | | | | https://github.com/pfsense/pfsense/pull/3139#pullrequestreview-156718 I ended up having to remove the select element and re-create it (along with the options) in order to get around what appears to be a bug in Safari.
| * Bugfixesstilez2016-09-151-15/+7
| | | | | | | | | | 1. On creating a new rule, $pconfig['ipprotocol'] is undefined, rather than defaults to what is seen in GUI (IPv4). Form generation logic for the ICMPType list box can't rely on a good value. It was fixed late here and missed when copying changes to Github. Very likely responsible for above issue by @rbgarga . Please confirm if this fixes it for you. On the off-chance that it still doesn't, can you let me know if _editing an existing rule_ works, which will help. 2. Reordering #proto options affects JS logic, because JS uses index() to identify which protocol is selected. Generally I feel this isn't the best practice, if the value is what matters then it's better and easier to review, if the code references the value itself (.val()) not the position in the list which could change (.index()). That said, I should have spotted this anyway.
| * Improve icmptype input sanitisingstilez2016-09-151-13/+22
| |
| * Enhance ICMP type handling in rulesstilez2016-09-151-50/+105
| | | | | | See main PR for details
* | Merge pull request #3248 from phil-davis/ipaddressnopatternRenato Botelho2016-12-271-2/+3
|\ \
| * | Form_IpAddress add types remove patternsPhil Davis2016-12-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Add alias and host types to Form_IpAddress with the appropriate hover text. 2) Remove the patterns - the UI of those is not so effective anyway, so leave the validation of input to the back end. 3) Update uses of Form_IpAddress to use the appropriate Alias or Host type as needed. 4) Remove explicit setPattern() from those uses of Form_IpAddress.
* | | Fix copy/paste error in variable test.jim-p2016-12-091-2/+2
|/ /
* | Merge pull request #3224 from phil-davis/patch-2Renato Botelho2016-11-251-1/+4
|\ \
| * | Keep the rule type selection after input errors on firewall rulePhil Davis2016-11-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user: a) Edit a firewall rule b) Select "single host or alias" c) Enter an invalid IP address that is not an alias d) Press "Save" The error is displayed "1.2.3.999 is not a valid source IP address or alias" But note that the rule type dropdown has changed to "Network". In the case where there is $_POST data, we do not want to try and deduce the srctype or dsttype from the IP address in the src or dst field, because the value of that field could be the very invalid data that the user entered. We want to maintain the value of srctype or dsttype that the user selected and let them correct the error they made in typing the actual IP address.
* | | Added addrtolower calls to force IPv6 addresses to lower caseSteve Beaver2016-11-221-2/+2
| | | | | | | | | | | | First of many
* | | Revert "Fix #6918 Allow aliases with capital letters in rules"Luiz Otavio O Souza2016-11-151-3/+2
| | | | | | | | | | | | This reverts commit 9444a281f051e11d5456cc37b2a3f56fc8a7bc33.
* | | Fix #6918 Allow aliases with capital letters in rulesPhil Davis2016-11-141-2/+3
|/ / | | | | | | | | | | | | | | | | | | Expand the types of Form_IpAddress so that the caller can specify exactly what combination of IPv4, IPv6 address and alias is allowed for the field. Set the appropriate input pattern and hover help text. Only toLowercase() the entered value if it has a ":" in it - i.e. it looks like it is intended to be an IPv6 address (rather than an IPv4 or an alias name).
* | Clarify source port warning when editing a firewall rule.jim-p2016-10-131-4/+4
| |
OpenPOWER on IntegriCloud