Bug #12483
openGUI creates inconsistent config.xml
0%
Description
With pfSense 2.5. If I update the Hostname from the GUI. The config diff shows the normal hostname change, in addition:
- <staticroutes></staticroutes>
+ <staticroutes>
+ </staticroutes>
This does not happen again with a consequent Hostname change, second time. However if I edit an OpenVPN server and save, the diff shows:
- <staticroutes>
- </staticroutes>
+ <staticroutes></staticroutes>
But subsequent edits on the OpenVPN server configuration does not repeat this change. Until Hostname is changed again after saving OpenVPN server settings. Then the first situation repeats.
I think there is some inconsistency of how certain parts of configuration is checked. Maybe the mistake is that in some parts of the code the system assigns an empty array if the array key points to an empty value. Perhaps some code forgot to do this?
This is a minor problem, but this sort of inconsistency makes reading diffs more difficult and confusing.
Files
Updated by Evren Yurtesen about 3 years ago
The `staticroutes` is just 1 example of many, there are few other configuration keys which are victim of this issue.
For a simple hostname change, there are several unrelated change information in diff output.