Error in Manager / CLI / Editor when an attribute is not defined
This issue is linked to #2058 (closed), but need a separate fix.
I get an error after migrating from 2.0.6 to 2.0.7, because the attribute samlIdPResolveCookie
has been removed in 2.0.7. There was a value stored in my configuration for this attribute, as it was valid in 2.0.6 version. But when trying to update conf with CLI or Editor, I had this error:
Use of uninitialized value in hash element at /usr/share/perl5/Lemonldap/NG/Manager/Conf/Parser.pm line 1117, <F1> line 958.
Can't call method "logger" on unblessed reference at /usr/share/perl5/Lemonldap/NG/Manager/Conf/Parser.pm line 1119, <F1> line 958.
This is because of these lines:
my $attr = $attrs->{$key};
my $type = $types->{ $attr->{type} };
The $attr
is not defined, so the call to $attr->{type}
fails. We need to test this.
Another issue with the logger. Seems we dont have $localConf
object with CLI or Editor, so we can't use $localConf->logger
. I don't know if this is a change of 2.0.7 or if we have the problem for some time now. This needs also to be fixed.