Commit 5afeddcb authored by Christophe Maudoux's avatar Christophe Maudoux

Merge branch 'master' of gitlab.ow2.org:lemonldap-ng/lemonldap-ng

parents 2178c8a2 e269d757
......@@ -140,17 +140,44 @@ sub delKey {
foreach my $el (@list) {
my @path = split $sep, $el->[0];
if ( $#path == 0 ) {
delete $new->{ $path[0] }->{ $el->[1] };
if ( exists $new->{ $path[0] }
&& exists $new->{ $path[0] }->{ $el->[1] } )
{
delete $new->{ $path[0] }->{ $el->[1] }
if exists $new->{ $path[0] }->{ $el->[1] };
}
}
elsif ( $#path == 1 ) {
if ( exists $new->{ $path[0] }
&& exists $new->{ $path[0] }->{ $path[1] }
&& exists $new->{ $path[0] }->{ $path[1] }->{ $el->[1] } )
{
delete $new->{ $path[0] }->{ $path[1] }->{ $el->[1] };
}
}
elsif ( $#path == 2 ) {
delete $new->{ $path[0] }->{ $path[1] }->{ $path[2] }->{ $el->[1] };
if ( exists $new->{ $path[0] }
&& exists $new->{ $path[0] }->{ $path[1] }
&& exists $new->{ $path[0] }->{ $path[1] }->{ $path[2] }
&& exists $new->{ $path[0] }->{ $path[1] }->{ $path[2] }
->{ $el->[1] } )
{
delete $new->{ $path[0] }->{ $path[1] }->{ $path[2] }
->{ $el->[1] };
}
}
elsif ( $#path == 3 ) {
delete $new->{ $path[0] }->{ $path[1] }->{ $path[2] }->{ $path[3] }
->{ $el->[1] };
if ( exists $new->{ $path[0] }
&& exists $new->{ $path[0] }->{ $path[1] }
&& exists $new->{ $path[0] }->{ $path[1] }->{ $path[2] }
&& exists $new->{ $path[0] }->{ $path[1] }->{ $path[2] }
->{ $path[3] }
&& exists $new->{ $path[0] }->{ $path[1] }->{ $path[2] }
->{ $path[3] }->{ $el->[1] } )
{
delete $new->{ $path[0] }->{ $path[1] }->{ $path[2] }
->{ $path[3] }->{ $el->[1] };
}
}
else {
die $el->[0] . " has too many levels. Aborting";
......
......@@ -216,8 +216,7 @@ sub do {
return [
401,
[
'WWW-Authenticate' => "SSO " . $self->conf->{portal},
'Access-Control-Allow-Origin' => '*'
'WWW-Authenticate' => "SSO " . $self->conf->{portal}
],
[qq'{"result":0,"error":$err}']
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment