The descriptions of each entry in an alias are stored in config.xml as a list delimited by "||". So you cannot have "||" in the actual description (or the description effectively splits into the next entry). Also you cannot start or end the description with "|" or it will be very confusing having the config with "|||" in it.
This code validates all that sort of invalid input.
firewall_aliases_import should have the same checks for reserved names as firewall_aliases_edit
This code should really be in a function in a common include file, but which one is the appropriate one?
For now I made the checks the same.
This enhancement allows the user to make a text file of IP addresses, IP subnets and/or IP ranges, like they have always been able to do, but with this they can put a description after each IP number and that description text will be saved in the alias. All existing functionality without specifying a description is unchanged, so it is backward-compatible.
This is handy when having aliases that are on all my pfSense boxes, I can make 1 text file, bulk import it on every system and now include descriptions of each chunk of IP address space.
Note: The artificial limit of 200 character descriptions is to catch the case where a user pastes a long list or IP addresses, but they are all on 1 line. An error message is given, rather than importing the 1st IP and considered the remaining ones as the description.
Optimal: Just updating the copyright years;
I wish to all of you all of health, happiness and good luck of earth to be in your hands for the new year! Other will come up later :)
And make pfsense better then before, more flexible for management/viewing from web (3rd party) using samba,ftp,whois,hw temp..etc.
Best regards.
The code was there to attempt to validate and implement IP address range lines in Alias Bulk Import e.g.
10.20.0.0-10.21.22.0
should produce a bunch of smaller ranges with appropriate CIDRs.
This fixes the code so IP address ranges actually make it through into the resulting Alias.
Fixes#3376. I have no idea what the "^" characters were meant to do, but removing them makes the CIDR/Update Freq value be displayed correctly when editing. Will there be some other side-effect from removing the "^"?