Skip to content

Commit

Permalink
Merge branch 'rel-6_5-dev' into rel-6_5-IB#1156232
Browse files Browse the repository at this point in the history
  • Loading branch information
pboguslawski authored Jan 10, 2025
2 parents 3c7f3ac + ffbf2ee commit 510c22d
Show file tree
Hide file tree
Showing 26 changed files with 140 additions and 87 deletions.
23 changes: 18 additions & 5 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 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)
- 2024-10-31 Template generator will now keep   in a template when in rich text mode and won't replace them with spaces anymore. This lead to multiple   reduced to one space being shown in the editor.
- 2024-10-24 Fixed Bug - 'Use of uninitialized value' warning on build custom package and there are no permissions to write to the target directory. Thanks to @BuilderNSV for reporting the issue. [#610](https://github.com/znuny/Znuny/issues/610)
- 2024-10-22 Perl Module Hash::Merge is now be listed in otrs.CheckModules.pl as mandatory.
- 2024-10-15 Ticket search for customer ID in customer interface now searches for the raw ID. Thanks to @BuilderNSV for reporting the issue. [#602](https://github.com/znuny/Znuny/issues/602)
- 2024-10-10 Updated MIME::Decoder::QuotedPrint from 5.509 to 5.515.
- 2024-10-07 Updated jstree from version 3.3.7 to 3.3.8.
- 2024-10-07 Updated nunjucks from version 3.2.2 to 3.2.3.

# 6.5.11 2024-10-02
- 2024-10-02 Added HTML filter to ProcessManagement/SLA template. Converts the characters <, >, & and " to &lt;, &gt;, &amp;, and &quot; respectively, protecting them from being interpreted as representing HTML tags or entities.
- 2024-09-26 Removed regex from Kernel::System::HTMLUtils::DocumentCleanup that could lead to a security issue. It replaced HTML of Microsoft Word. Thanks for reporting to Emin Yazi (@eyazi), Efflux.
Expand Down Expand Up @@ -105,7 +118,7 @@
- 2023-08-11 Added additional note to DynamicFields::ScreenConfiguration::ConfigKeysOfScreensByObjectType###Framework for AgentTicketSearch (DynamicField|DefaultColumns).
- 2023-08-11 Fixed - Installing a package with dependency not possible - Added additional check if any problem exists - means if any package or module is not installed.
- 2023-08-11 Changed default value of Frontend::AvatarEngine to None.
- 2023-08-07 Fixed missing $ on StartDateTimeObject -> $StartDateTimeObject (#475). Thanks to @LuBroering (Lukas Bröring SectorNord AG). [PR#475](https://github.com/znuny/Znuny/pull/475).
- 2023-08-07 Fixed missing $ on StartDateTimeObject -> $StartDateTimeObject (#475). Thanks to @LuBroering (Lukas Bröring Sector Nord AG). [PR#475](https://github.com/znuny/Znuny/pull/475).
- 2023-08-07 Fixed description for SysConfig Setting 'Stats::UseAgentElementInStats' and 'Stats::UseInvalidAgentInStats'.
- 2023-08-07 Fixed message subject prefill on Activity dialog only works for Agent. https://github.com/znuny/Znuny/issues/363
- 2023-08-04 Fixed auto-selection of first found element in dynamic field web service single-select dropdown.
Expand Down Expand Up @@ -245,7 +258,7 @@
- 2022-09-02 Fixed default display value for dynamic fields of type 'Webservice'.
- 2022-09-02 Bugfix and Feature for 0050-CIC-CustomerUserList. Thanks to Kevin Janssen (@BuTzZ). [PR#147](https://github.com/znuny/Znuny/pull/147)
- 2022-09-01 Added missing 'Translatable' flag for 'Message sending error'.Thanks to Paweł Bogusławski (@pboguslawski). [PR#131](https://github.com/znuny/Znuny/pull/131)
- 2022-08-31 Bugfix for process and process templates. Thanks to @LuBroering (Lukas Bröring SectorNord AG). [PR#276](https://github.com/znuny/Znuny/pull/276). Thanks to Tim Püttmanns (@tipue-dev), maxence. [#277](https://github.com/znuny/Znuny/pull/277)
- 2022-08-31 Bugfix for process and process templates. Thanks to @LuBroering (Lukas Bröring Sector Nord AG). [PR#276](https://github.com/znuny/Znuny/pull/276). Thanks to Tim Püttmanns (@tipue-dev), maxence. [#277](https://github.com/znuny/Znuny/pull/277)
- 2022-08-31 Added events for article email backend transmission errors. Thanks to Renée Bäcker. [PR#176](https://github.com/znuny/Znuny/pull/176)
- 2022-08-26 Fixed encoding of log output. Thanks to Roland Jäger and Bernhard Schmalhofer. [#286](https://github.com/znuny/Znuny/issues/286)
- 2022-08-24 Enabled pending time selection for process ticket dialogs depending on selected ticket state. Thanks to Tim Püttmanns, maxence. [PR#271](https://github.com/znuny/Znuny/pull/271)
Expand Down Expand Up @@ -358,7 +371,7 @@
- 2021-12-01 Fixed Bug - Avoidable error message / entry in logfiles (#123). [#123](https://github.com/znuny/Znuny/issues/123)
- 2021-11-26 Fixed error "Parameter 'Config' must be a hash ref with data!" (#173). Thanks to @meisterheister. [#173](https://github.com/znuny/Znuny/issues/173)
- 2021-11-25 Removed error log if !IsHashRefWithData( Config ) in `SanitizeConfig`. This is to strict and not needed.
- 2021-11-25 Sector Nord AG: Replaced hardcoded attributes with a dynamic Sysconfig in Kernel/System/Ticket/Event/NotificationEvent.pm (#171). Thanks to @LuBroering (Lukas Bröring SectorNord AG). [#171](https://github.com/znuny/Znuny/pull/171)
- 2021-11-25 Sector Nord AG: Replaced hardcoded attributes with a dynamic Sysconfig in Kernel/System/Ticket/Event/NotificationEvent.pm (#171). Thanks to @LuBroering (Lukas Bröring Sector Nord AG). [#171](https://github.com/znuny/Znuny/pull/171)
- 2021-11-25 Add option '--no-tablespaces' to scripts/backup.pl (#136). Thanks to @meisterheister. [#136](https://github.com/znuny/Znuny/pull/136)
- 2021-11-25 Prevents error message "no TicketID" on sending an answer if no TicketID exists (#133). Thanks to Renée Bäcker (@reneeb). [#133](https://github.com/znuny/Znuny/pull/133)
- 2021-11-25 Fixed - "No TicketID is given!" on each outgoing reply (#170). Thanks to Renée Bäcker (@reneeb). [#170](https://github.com/znuny/Znuny/issues/170)
Expand All @@ -376,7 +389,7 @@
- 2021-11-29 Fixed POD of Kernel::System::ProcessManagement::TransitionAction::DynamicFieldRemove::Run.
- 2021-11-26 Fixed error "Parameter 'Config' must be a hash ref with data!" (#173). Thanks to @meisterheister. [#173](https://github.com/znuny/Znuny/issues/173)
- 2021-11-25 Removed error log if !IsHashRefWithData( Config ) in `SanitizeConfig`. This is to strict and not needed.
- 2021-11-25 Sector Nord AG: Replaced hardcoded attributes with a dynamic Sysconfig in Kernel/System/Ticket/Event/NotificationEvent.pm (#171). Thanks to @LuBroering (Lukas Bröring SectorNord AG). [#171](https://github.com/znuny/Znuny/issues/171)
- 2021-11-25 Sector Nord AG: Replaced hardcoded attributes with a dynamic Sysconfig in Kernel/System/Ticket/Event/NotificationEvent.pm (#171). Thanks to @LuBroering (Lukas Bröring Sector Nord AG). [#171](https://github.com/znuny/Znuny/issues/171)
- 2021-11-25 Add option '--no-tablespaces' to scripts/backup.pl (#136). Thanks to @meisterheister. [#136](https://github.com/znuny/Znuny/issues/136)
- 2021-11-25 Prevents error message "no TicketID" on sending an answer if no TicketID exists (#133). Thanks to @Reedu. [#133](https://github.com/znuny/Znuny/issues/133)
- 2021-11-25 Fixed - "No TicketID is given!" on each outgoing reply (#170). Thanks to Renée Bäcker (@reneeb). [#170](https://github.com/znuny/Znuny/issues/170)
Expand Down Expand Up @@ -523,7 +536,7 @@
- 2021-12-01 Fixed Bug - Avoidable error message / entry in logfiles (#123). [#123](https://github.com/znuny/Znuny/issues/123)
- 2021-11-26 Fixed error "Parameter 'Config' must be a hash ref with data!" (#173). Thanks to @meisterheister. [#173](https://github.com/znuny/Znuny/issues/173)
- 2021-11-25 Removed error log if !IsHashRefWithData( Config ) in `SanitizeConfig`. This is to strict and not needed.
- 2021-11-25 Sector Nord AG: Replaced hardcoded attributes with a dynamic Sysconfig in Kernel/System/Ticket/Event/NotificationEvent.pm (#171). Thanks to @LuBroering (Lukas Bröring SectorNord AG). [#171](https://github.com/znuny/Znuny/issues/171)
- 2021-11-25 Sector Nord AG: Replaced hardcoded attributes with a dynamic Sysconfig in Kernel/System/Ticket/Event/NotificationEvent.pm (#171). Thanks to @LuBroering (Lukas Bröring Sector Nord AG). [#171](https://github.com/znuny/Znuny/issues/171)
- 2021-11-25 Add option '--no-tablespaces' to scripts/backup.pl (#136). Thanks to @meisterheister. [#136](https://github.com/znuny/Znuny/issues/136)
- 2021-11-25 Prevents error message "no TicketID" on sending an answer if no TicketID exists (#133). Thanks to @Reedu. [#133](https://github.com/znuny/Znuny/issues/133)
- 2021-11-25 Fixed - "No TicketID is given!" on each outgoing reply (#170). Thanks to @Reedu. [#170](https://github.com/znuny/Znuny/issues/170)
Expand Down
8 changes: 4 additions & 4 deletions Kernel/Config/Defaults.pm
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,8 @@ sub LoadDefaults {
'thirdparty/jquery-validate-1.16.0/jquery.validate.js',
'thirdparty/jquery-ui-1.13.3/jquery-ui.js',
'thirdparty/jquery-pubsub/pubsub.js',
'thirdparty/jquery-jstree-3.3.7/jquery.jstree.js',
'thirdparty/nunjucks-3.2.2/nunjucks.min.js',
'thirdparty/jquery-jstree-3.3.8/jquery.jstree.js',
'thirdparty/nunjucks-3.2.3/nunjucks.min.js',
'Core.Init.js',
'Core.Debug.js',
'Core.Exception.js',
Expand Down Expand Up @@ -1036,8 +1036,8 @@ sub LoadDefaults {
'thirdparty/jquery-ui-touch-punch-0.2.3/jquery.ui.touch-punch.js',
'thirdparty/jquery-validate-1.16.0/jquery.validate.js',
'thirdparty/jquery-pubsub/pubsub.js',
'thirdparty/jquery-jstree-3.3.7/jquery.jstree.js',
'thirdparty/nunjucks-3.2.2/nunjucks.min.js',
'thirdparty/jquery-jstree-3.3.8/jquery.jstree.js',
'thirdparty/nunjucks-3.2.3/nunjucks.min.js',
'thirdparty/jscolor-2.4.6/jscolor.js',
'Core.Init.js',
'Core.JavaScriptEnhancements.js',
Expand Down
8 changes: 4 additions & 4 deletions Kernel/Config/Files/XML/Framework.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8031,8 +8031,8 @@ via the Preferences button after logging in.
<Item>thirdparty/jquery-ui-touch-punch-0.2.3/jquery.ui.touch-punch.js</Item>
<Item>thirdparty/jquery-validate-1.16.0/jquery.validate.js</Item>
<Item>thirdparty/jquery-pubsub/pubsub.js</Item>
<Item>thirdparty/jquery-jstree-3.3.7/jquery.jstree.js</Item>
<Item>thirdparty/nunjucks-3.2.2/nunjucks.min.js</Item>
<Item>thirdparty/jquery-jstree-3.3.8/jquery.jstree.js</Item>
<Item>thirdparty/nunjucks-3.2.3/nunjucks.min.js</Item>
<Item>thirdparty/jscolor-2.4.6/jscolor.js</Item>
<Item>Core.Init.js</Item>
<Item>Core.JavaScriptEnhancements.js</Item>
Expand Down Expand Up @@ -8133,8 +8133,8 @@ via the Preferences button after logging in.
<Item>thirdparty/jquery-validate-1.16.0/jquery.validate.js</Item>
<Item>thirdparty/jquery-ui-1.13.3/jquery-ui.js</Item>
<Item>thirdparty/jquery-pubsub/pubsub.js</Item>
<Item>thirdparty/jquery-jstree-3.3.7/jquery.jstree.js</Item>
<Item>thirdparty/nunjucks-3.2.2/nunjucks.min.js</Item>
<Item>thirdparty/jquery-jstree-3.3.8/jquery.jstree.js</Item>
<Item>thirdparty/nunjucks-3.2.3/nunjucks.min.js</Item>
<Item>Core.Init.js</Item>
<Item>Core.Debug.js</Item>
<Item>Core.Exception.js</Item>
Expand Down
2 changes: 1 addition & 1 deletion Kernel/GenericInterface/Operation/Ticket/TicketUpdate.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#2422 --
# --
# Copyright (C) 2001-2021 OTRS AG, https://otrs.com/
# Copyright (C) 2021 Znuny GmbH, https://znuny.org/
# Copyright (C) 2021 maxence business consulting GmbH, http://www.maxence.de
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AdminSelectBox.pm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ sub Run {
{

my @Data;
my $MatchesFound;
my $MatchesFound = 0;

# add result block
$LayoutObject->Block(
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AgentTicketSearch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ sub Run {
push @PDFRow, $Created;
push @PDFRow, $Data{From};
push @PDFRow, $Data{Subject};
push @PDFRow, $Data{State};
push @PDFRow, $LayoutObject->{LanguageObject}->Translate( $Data{State} );
push @PDFRow, $Data{Queue};
push @PDFRow, $Owner;
push @PDFRow, $Customer;
Expand Down
10 changes: 5 additions & 5 deletions Kernel/Modules/CustomerTicketSearch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ sub Run {

# get array params
for my $Key (
qw(CustomerID StateIDs StateTypeIDs PriorityIDs OwnerIDs ResponsibleIDs ServiceIDs
qw(CustomerIDRaw StateIDs StateTypeIDs PriorityIDs OwnerIDs ResponsibleIDs ServiceIDs
TypeIDs
)
)
Expand Down Expand Up @@ -882,7 +882,7 @@ sub Run {
push @PDFRow, $Created;
push @PDFRow, $Data{From};
push @PDFRow, $Data{Subject};
push @PDFRow, $Data{State};
push @PDFRow, $LayoutObject->{LanguageObject}->Translate( $Data{State} );
push @PDFRow, $Data{Queue};
push @PDFRow, $Customer;
push @PDFData, \@PDFRow;
Expand Down Expand Up @@ -1345,7 +1345,7 @@ sub Run {

KEY:
for my $Key (
qw(TicketNumber From To Cc Subject Body CustomerID TimeSearchType StateType
qw(TicketNumber From To Cc Subject Body CustomerIDRaw TimeSearchType StateType
StateIDs StateTypeIDs PriorityIDs OwnerIDs ResponsibleIDs
)
)
Expand Down Expand Up @@ -1700,10 +1700,10 @@ sub MaskForm {

$Param{CustomerIDStrg} = $LayoutObject->BuildSelection(
Data => \%Customers,
Name => 'CustomerID',
Name => 'CustomerIDRaw',
Multiple => 1,
Size => 5,
SelectedID => $Param{CustomerID},
SelectedID => $Param{CustomerIDRaw},
Class => 'Modernize',
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<p>[% Translate("e. g. 10*5155 or 105658*") | html %]</p>
</div>
<div>
<label for="CustomerID">[% Translate("CustomerID") | html %]</label>
<label for="CustomerIDRaw">[% Translate("CustomerID") | html %]</label>
[% Data.CustomerIDStrg %]
</div>
</fieldset>
Expand Down
18 changes: 15 additions & 3 deletions Kernel/Output/Template/Document.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ package Kernel::Output::Template::Document;
use strict;
use warnings;

use Kernel::System::VariableCheck qw(:all);

use parent qw (Template::Document);

our $ObjectManagerDisabled = 1;
Expand Down Expand Up @@ -350,9 +352,19 @@ sub _PrecalculateBlockHookSubscriptions {

my %BlockHooks;

for my $Key ( sort keys %{ $Config // {} } ) {
for my $Template ( sort keys %{ $Config->{$Key} // {} } ) {
for my $Block ( @{ $Config->{$Key}->{$Template} // [] } ) {
for my $Action ( sort keys %{ $Config // {} } ) {
TEMPLATE:
for my $Template ( sort keys %{ $Config->{$Action} // {} } ) {
if ( !IsArrayRefWithData( $Config->{$Action}->{$Template} ) ) {
$Kernel::OM->Get('Kernel::System::Log')->Log(
Priority => 'error',
Message => 'Invalid configuration for Frontend::Template::GenerateBlockHooks###' . $Action
. '. Array reference is required. Action => [Templates].',
);
next TEMPLATE;
}

for my $Block ( @{ $Config->{$Action}->{$Template} // [] } ) {
$BlockHooks{$Template}->{$Block} = 1;
}
}
Expand Down
24 changes: 15 additions & 9 deletions Kernel/System/CalendarEvents/ICS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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{&nbsp}{ }g;
}
my $PropertyString;
if ( $Data->{$Property} ) {
if ( IsStringWithData( $Data->{$Property} ) ) {
my %Safety = $HTMLUtilsObject->Safety(
String => $Data->{$Property},
NoApplet => 1,
Expand Down
18 changes: 6 additions & 12 deletions Kernel/System/Console/Command/Dev/Package/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package Kernel::System::Console::Command::Dev::Package::Build;

use strict;
use warnings;
use utf8;

use parent qw(Kernel::System::Console::BaseCommand);

Expand Down Expand Up @@ -125,25 +126,18 @@ sub Run {
my $File = $Kernel::OM->Get('Kernel::System::Main')->FileWrite(
Location => $Self->GetArgument('target-directory') . '/' . $Filename,
Content => \$Content,
Mode => 'utf8', # binmode|utf8
Type => 'Local', # optional - Local|Attachment|MD5
Permission => '644', # unix file permissions
Mode => 'utf8',
Type => 'Local',
Permission => '644',
);

if ( !$File ) {
$Self->PrintError("File $File could not be written.\n");
$Self->PrintError("File $Filename could not be written.\n");
return $Self->ExitCodeError();
}

$Self->Print("<green>Done.</green>\n");
return $Self->ExitCodeOk();
}

# sub PostRun {
# my ( $Self, %Param ) = @_;
#
# # This will be called after Run() (even in case of exceptions). Perform any cleanups here.
#
# return;
# }

1;
9 changes: 3 additions & 6 deletions Kernel/System/DateTime.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1822,12 +1822,9 @@ sub _StringToHash {
# If it isn't an offset consider it a timezone
if ( $OffsetOrTZ !~ m/(\+|\-)\d{2}:?\d{2}/i ) {

# Make sure the time zone is valid. Otherwise, assume UTC.
if ( !$Self->IsTimeZoneValid( TimeZone => $OffsetOrTZ ) ) {
$OffsetOrTZ = 'UTC';
}

$OffsetOrTZ = $Self->GetRealTimeZone( TimeZone => $OffsetOrTZ );
# Make sure the time zone is valid. If it is an alias, replace it
# with the real name, otherwise assume UTC.
$OffsetOrTZ = $Self->GetRealTimeZone( TimeZone => $OffsetOrTZ ) // 'UTC';

return {
%{$DateTimeHash},
Expand Down
1 change: 0 additions & 1 deletion Kernel/System/TemplateGenerator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ sub Template {
$TemplateText =~ s/&gt;/>/g;
$TemplateText =~ s/&quot;/"/g;
$TemplateText =~ s/&apos;/'/g;
$TemplateText =~ s/&nbsp;/ /g;
}

return $TemplateText;
Expand Down
Loading

0 comments on commit 510c22d

Please sign in to comment.