Use case: 1) Edit a gateway that has no advanced settings (i.e. the Advanced section does not need to open on page load) - that works fine. 2) Modify the Gateway IP Address to something invalid like 1:2::z 3) Press Save The error is shown - "A valid gateway IP address must be specified" - good. The Advanced section is shown - not good. The problem is that after POSTing the page, and the resulting validation, finding an input error, and re-displaying the page, each of the $pconfig keys is set, even though set to the empty string "". So the isset() tests are true, and it gets the wrong idea. We only care about these parameters if they are not "". In this case !empty() gives the correct result, because although a value of 0 will be considered empty, 0 is not allowed by the front-end of the UI anyway (as it happens, these parameters are not allowed to be 0), so we never get that case. And by the way, I generally hate empty() because of having to think of all its quirks. |
||
|---|---|---|
| build/scripts | ||
| src | ||
| tools | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| BOOTSTRAP.md | ||
| build.conf.sample | ||
| build.sh | ||
| LICENSE | ||
| README.md | ||
pfSense
Overview
The pfSense project is a free network firewall distribution, based on the FreeBSD operating system with a custom kernel and including third party free software packages for additional functionality. pfSense software, with the help of the package system, is able to provide the same functionality or more of common commercial firewalls, without any of the artificial limitations. It has successfully replaced every big name commercial firewall you can imagine in numerous installations around the world, including Check Point, Cisco PIX, Cisco ASA, Juniper, Sonicwall, Netgear, Watchguard, Astaro, and more.
pfSense software includes a web interface for the configuration of all included components. There is no need for any UNIX knowledge, no need to use the command line for anything, and no need to ever manually edit any rule sets. Users familiar with commercial firewalls catch on to the web interface quickly, though there can be a learning curve for users not familiar with commercial-grade firewalls.
pfSense started in 2004 as a fork of the m0n0wall Project (which ended 2015/02/15), though has diverged significantly since.
pfSense is Copyright 2004-2016 Rubicon Communications, LLC (Netgate) and published under an open source license. Read more at https://pfsense.org/ and support the team by buying a Gold Membership Subscription, bundled hardware appliances or commercial support.
Contribute
The pfSense project welcomes contributions, big or small. Members of the pfSense community frequently contribute bug fixes, enhancements, and documentation changes to improve the functionality and usability of the software.
All of the pfSense project source code is on Github. We recommend potential contributors familiarize themselves with the pfSense project git repositories and Github in general
For legal reasons, we require those seeking to contribute source code changes to review and sign the license agreement (LA) and either the Individual or Corporate CLA.
If you want to contribute but do not have a specific topic in mind, review the list of open bug reports and other issues that are in need of attention.
Before making source code changes, be sure to review our Developer Style Guide so that the submitted code matches our preferred coding style.
Changes may be submitted as pull requests on github once the LA and CLA signing process has been completed. After being submitted, our developers will review the requests, offer feedback, and merge the changes if they are acceptable.
Contact coreteam@pfsense.org with any additional questions or concerns.