summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 27de489)
raw | patch | inline | side by side (parent: 27de489)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 6 Oct 2008 09:41:54 +0000 (09:41 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 6 Oct 2008 09:41:54 +0000 (09:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12603 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index e0c98a709bc1ac622436b37aa2662d207deb066e..61528f048d6522cff65ef50d52481509ca95b314 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
# check header
if( not exists $msg_hash->{'header'} ) { die "no header specified"; }
my $header_l = $msg_hash->{'header'};
- if( 1 > @{$header_l} ) { die 'empty header tag'; }
+ if( (1 > @{$header_l}) || ( ( 'HASH' eq ref @{$header_l}[0]) && (1 > keys %{@{$header_l}[0]}) ) ) { die 'empty header tag'; }
if( 1 < @{$header_l} ) { die 'more than one header specified'; }
my $header = @{$header_l}[0];
if( 0 == length $header) { die 'empty string in header tag'; }
# check source
if( not exists $msg_hash->{'source'} ) { die "no source specified"; }
my $source_l = $msg_hash->{'source'};
- if( 1 > @{$source_l} ) { die 'empty source tag'; }
+ if( (1 > @{$source_l}) || ( ( 'HASH' eq ref @{$source_l}[0]) && (1 > keys %{@{$source_l}[0]}) ) ) { die 'empty source tag'; }
if( 1 < @{$source_l} ) { die 'more than one source specified'; }
my $source = @{$source_l}[0];
if( 0 == length $source) { die 'source error'; }
# check target
if( not exists $msg_hash->{'target'} ) { die "no target specified"; }
my $target_l = $msg_hash->{'target'};
- if( 1 > @{$target_l} ) { die 'empty target tag'; }
+ if( (1 > @{$target_l}) || ( ('HASH' eq ref @{$target_l}[0]) && (1 > keys %{@{$target_l}[0]}) ) ) { die 'empty target tag'; }
}
};
if($@) {