| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
When entering a host alias, if the user put an IP range (like 192.168.0.10-192.168.0.20) or a subnet (like 192.168.1.200/29) then expand it into a list of individual IP addresses. Check that it will not make too many rows to exceed the existing 5000 row limit on the GUI.
Note: expanding ranges and subnets like this is only for IPv4 for now. Entering an IPv6 range or subnet in a hosts alias will display a message telling the user that is not supported - it could be done in future but currently the routines that convert this stuff are only for IPv4.
I have done as much validation as I can think of, and where there is a problem the original user-entered data is preserved for re-display, as well as the input errors being displayed. So IMO it should be self-documenting.
|
|
|
| |
to minimize risk of a problem when adding code here in the future.
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if you enter a space-separated list of subnets in the IP address box when entering an alias, the code reports that the data is invalid. But it does actually expand the list of subnets into multiple rows, and enters the various subnet CIDRs into the CIDR column for the user. The user can press Save a second time and the data is now valid so the code saves it happily. This is rather odd, as reported in redmine #3890.
Also, if you input an IP range (e.g. 192.168.20.0-192.168.20.30) plus description and in the 2nd row put some other subnet and description, the range is correctly expanded, but the description only appears against the 1st subnet of the range. The description from the 2nd row ends up as the description against the 2nd subnet of the range, and the rest of the descriptions are blank. i.e. the descriptions do not get copied and pushed down as the IP ranges are expanded.
This change fixes all that stuff by first parsing the posted data and expanding any IP ranges and/or space-separated lists, building arrays that have all their entries lined up:
$input_addresses[]
$input_address_subnet[]
$final_address_details[]
which are then validated.
This is for master (2.2) branch. Actually it was not too difficult to integrate.
|
|
|
|
|
|
| |
If type URL Table then the heading "Description" on the 3rd column gets suppressed (I am not really sure why that is, since the description data entry box still appears - I guess someone intended that the data entry box itself also be suppressed, since URL Table takes just a single line entry, the overall description of the alias should be enough - no need for a per-line description.)
In any case, if the user then selects some other Alias Type, the "Description" heading on the 3rd column is not re-enabled.
This change fixes that.
I also implemented what is suggested in Redmine #3893 - making the 1st column heading say "IP or FQDN", "Network or FQDN". IMHO that looks fine on the UI and cannot do any harm. (and yes, the longer explanatory text already tells the user that an FQDN is allowed in these cases.)
|
|
|
|
|
|
|
|
|
|
|
| |
While looking at other checks in the code I noticed this check. It was not effective anyway, because the first line inside "if ($_POST)" below does
unset($input_errors);
which undoes this check anyway.
In any case the check is not relevant. For example I might have interface WAN with description (which is really the alternate/display name for an interface) as MYISP.
I cannot also have an Alias with name MYISP - that is checked for already later in the code.
But I can have an Alias with description MYISP - in the case of an Alias the description really is just helpful text for the user, it is the name that really counts for use in the pf configuration.
So the code is not needed.
|
|
|
|
| |
avoids issues like happened to users on ticket #3856. While I'm here, replace GET by POST
|
|
|
|
| |
removing wrong users when browser back button is used. It should fix #3856
|
| |
|
|\ |
|
| |
| |
| |
| | |
Remember and correctly display GPS type setting
|
|/
|
|
| |
with roubleshooting issues
|
| |
|
|
|
|
| |
Missing explode of selected interface list prevent logic from working.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
interface name always. It fixes #3874
|
| |
|
|
|
|
| |
empty or not array
|
| |
|
|
|
|
| |
already done and it causes dhcpd to restart one more time on secondary nodes. It fixes #3797
|
|
|
|
|
|
|
| |
* Update jquery to latest version
* Use production version instead of development
* Rename file to have version on it and avoid browser cache issues
* Add jquery-migrate to keep backward compatible with old version
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
"id" attributes cannot start with a numeric character, so change "8hour"
to "eighthour" and "4year" to "fouryear".
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
Tidy up the "=" sign properly!
Remove "=" sign from INPUT tag
Change alignment to the "middle" of the TD tag
Add missing closing FONT tag
|
|\ \ |
|
| |/
| |
| |
| | |
Remove invalid "summary" attribute from TD tag
|
|\ \ |
|
| |/
| |
| |
| |
| |
| | |
Remove duplicate closing TR tag
DIV tag cannot be enclosed in a B (bold) tag
Change class and style
|
|\ \ |
|
| |/
| |
| |
| |
| |
| | |
While using the widescreen theme, when you update the firmware or add a
new package the TEXTAREAs are side-by-side which doesn't look neat.
Add BR tag between TEXTAREA
|
|/
|
|
| |
"id" must be a unique attribute.
|
|
|
|
| |
HTTP_REFERER, there are a couple of places I didn't touch on this commit because it requires more work
|
| |
|
|
|
|
| |
with iOS devices
|
|
|
|
| |
start and might not work on all cases
|
|
|
|
| |
on necessary pages. It fixes #3856
|
|
|
|
| |
is called from other places
|
| |
|
| |
|
| |
|
|
|
|
| |
status page handles tat
|