From eb2785201a6336d5f5ad1864490cebe690a6d7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.bernigaud@opensides.be> Date: Mon, 4 Apr 2016 10:45:57 +0200 Subject: [PATCH] Fixes #4656 Print a clearer error message when an XML error happens --- contrib/bin/fusiondirectory-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bin/fusiondirectory-setup b/contrib/bin/fusiondirectory-setup index 980464e71..a008f2a1f 100644 --- a/contrib/bin/fusiondirectory-setup +++ b/contrib/bin/fusiondirectory-setup @@ -732,7 +732,7 @@ sub get_ldap_connexion { # read ldap's server's info from /etc/fusiondirectory/fusiondirectory.conf if (-e $fd_config) { my $twig = XML::Twig->new(); # create the twig - $twig->parsefile($fd_config); # build it + $twig->safe_parsefile($fd_config) or die("There is an error in $fd_config XMLÂ code: ".(split /\n/, $@)[1]."\n"); my @locs = $twig->root->first_child('main')->children('location'); my %locations = (); foreach my $loc (@locs) { -- GitLab