Project

General

Profile

Actions

Bug #3755

closed

XML error: "X cannot occur more than once" kills the frontends

Added by Matthew Carras over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Backup / Restore
Target version:
-
Start date:
07/13/2014
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

I recently got some new hardware and moved my old 2.0.4 setup to 2.1.4 by manually merging the configuration files for the two setups, as 2.1.4 and 2.0.4 have some significant changes, and I didn't want to overwrite settings put there based on hardware (it'd be nice to have an "agnostic" backup, but I digress). While merging I made some errors by keeping a few empty entries like "<openvpns/>" still in there, since the order of entries had changed between the two versions. And right now in 2.1.4, having multiple entries in imported configuration is entirely fatal: you can't do ANYTHING -- it just gives an error such as "XML error: OPENVPN cannot occur more than once" as the only output to the WebGUI, and as the only output and result upon selecting any command from the console, thus meaning you can't even use a backup configuration. Eventually I fixed this problem just by reinstalling over and over again, seeing if my modifications to the imported config were correct this time.

What's puzzling about this bug is that the parser can obviously detect the error, so if it's so fatal -- breaking all of pfSense's frontends -- why doesn't it pre-parse and refuse to import? And even more puzzling: why is this so fatal? The error indicates it already knows of the other entry, so why not just ignore duplicates, rather than the parser just die()ing and thus killing pfSense's frontend? Although I'm sure manually-edited configurations aren't necessarily supported, this seems like the type of problem that could lead to even more serious problems; especially when plugins are involved.

Actions #1

Updated by Chris Buechler over 9 years ago

  • Description updated (diff)
  • Status changed from New to Rejected

don't create invalid config files is the lesson here. Always test on an unimportant system before restoring. And never merge config files between different versions.

Actions

Also available in: Atom PDF