diff --git a/CHANGES.md b/CHANGES.md index ec8d6c95470..51bf82f3186 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,5 @@ # 6.5.12 2024-??-?? + -2024-12-06 Fixed data evaluation in ICS calendar event. - 2024-11-28 Fixed Server Error, when Frontend::Template::GenerateBlockHooks###NAME has no valid data structure. - 2024-11-01 Fixed Bug - Translate the ticket state in PDF search result (AgentTicketSearch|CustomerTicketSearch). Thanks to @BuilderNSV for reporting the issue. [#615](https://github.com/znuny/Znuny/issues/615) - 2024-11-01 Sector Nord AG: Fixed uninitialized value in AdminSelectBox. Thanks to Sector Nord AG (@jsinagowitz). [PR#611](https://github.com/znuny/Znuny/pull/611) diff --git a/Kernel/System/CalendarEvents/ICS.pm b/Kernel/System/CalendarEvents/ICS.pm index 71d189b63b9..365ae9410df 100644 --- a/Kernel/System/CalendarEvents/ICS.pm +++ b/Kernel/System/CalendarEvents/ICS.pm @@ -284,10 +284,13 @@ sub _PrepareData { my $Data = $Events{$EventID}; - my $DTStart = $Data->{DTSTART}; - my $DTEnd = $Data->{DTEND}; - my $DTStartLocal = $Data->{DTSTART}->{local_c}; - my $DTEndLocal = $Data->{DTEND}->{local_c}; + my $DTStart = $Data->{DTSTART}; + my $DTEnd = $Data->{DTEND}; + + next EVENTID if ( ref $DTStart ne 'DateTime' ) || ( ref $DTEnd ne 'DateTime' ); + + my $DTStartLocal = $DTStart->{local_c}; + my $DTEndLocal = $DTEnd->{local_c}; my %Date = ( Start => { @@ -374,10 +377,13 @@ sub _PrepareData { } } - my $Organizer = $Data->{ORGANIZER}->{CN}; - if ($Organizer) { + if ( + IsHashRefWithData( $Data->{ORGANIZER} ) + && IsStringWithData( $Data->{ORGANIZER}->{CN} ) + ) + { my %Safety = $HTMLUtilsObject->Safety( - String => $Organizer, + String => $Data->{ORGANIZER}->{CN}, NoApplet => 1, NoObject => 1, NoEmbed => 1, @@ -420,13 +426,13 @@ sub _PrepareData { } for my $Property (qw(DESCRIPTION SUMMARY LOCATION)) { - if ( $Data->{$Property} ) { + if ( IsStringWithData( $Data->{$Property} ) ) { $Data->{$Property} =~ s{\\n}{\n}g; $Data->{$Property} =~ s{\\r}{\r}g; $Data->{$Property} =~ s{ }{ }g; } my $PropertyString; - if ( $Data->{$Property} ) { + if ( IsStringWithData( $Data->{$Property} ) ) { my %Safety = $HTMLUtilsObject->Safety( String => $Data->{$Property}, NoApplet => 1,