Skip to content

Commit

Permalink
The system command in SysConfig option "MIME-Viewer" now is only conf…
Browse files Browse the repository at this point in the history
…igurable via Kernel/Config.pm (CVE-2021-36100).
  • Loading branch information
jepf committed Apr 5, 2022
1 parent 309ec53 commit f6fe8ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
@@ -1,4 +1,5 @@
# 6.0.41 2022-xx-xx
- 2022-03-24 The system command in SysConfig option "MIME-Viewer" now is only configurable via Kernel/Config.pm (CVE-2021-36100).
- 2022-03-31 Fixed check of UntilTime in Kernel::System::Ticket::Event::TicketPendingTimeReset. [#221)(https://github.com/znuny/Znuny/issues/221)
- 2022-03-23 Removed configurable system commands from generic agents (CVE-2021-36100).
- 2022-03-14 Fixed sending notifications to invalid customer users.
Expand Down
16 changes: 8 additions & 8 deletions Kernel/Config/Defaults.pm
Expand Up @@ -913,15 +913,15 @@ sub LoadDefaults {
# --------------------------------------------------- #
# MIME-Viewer for online to html converter
# --------------------------------------------------- #
# (e. g. xlhtml (xls2html), http://chicago.sourceforge.net/xlhtml/)
# $Self->{'MIME-Viewer'}->{'application/excel'} = 'xlhtml';
# (e.g. xlhtml (xls2html), http://chicago.sourceforge.net/xlhtml/)
# $Self->{'MIME-Viewer'}->{'application/excel'} = 'xlhtml';
# MIME-Viewer for online to html converter
# (e. g. wv (word2html), http://wvware.sourceforge.net/)
# $Self->{'MIME-Viewer'}->{'application/msword'} = 'wvWare';
# (e. g. pdftohtml (pdf2html), http://pdftohtml.sourceforge.net/)
# $Self->{'MIME-Viewer'}->{'application/pdf'} = 'pdftohtml -stdout -i';
# (e. g. xml2html (xml2html))
# $Self->{'MIME-Viewer'}->{'text/xml'} = $Self->{Home}.'/scripts/tools/xml2html.pl';
# (e.g. wv (word2html), http://wvware.sourceforge.net/)
# $Self->{'MIME-Viewer'}->{'application/msword'} = 'wvWare';
# (e.g. pdftohtml (pdf2html), http://pdftohtml.sourceforge.net/)
# $Self->{'MIME-Viewer'}->{'application/pdf'} = 'pdftohtml -stdout -i';
# (e.g. xml2html (xml2html))
# $Self->{'MIME-Viewer'}->{'text/xml'} = $Self->{Home}.'/scripts/tools/xml2html.pl';

# --------------------------------------------------- #
# directories #
Expand Down
28 changes: 0 additions & 28 deletions Kernel/Config/Files/XML/Framework.xml
Expand Up @@ -2637,34 +2637,6 @@
<Item ValueType="String" ValueRegex="">admin</Item>
</Value>
</Setting>
<Setting Name="MIME-Viewer###application/excel" Required="0" Valid="0">
<Description Translatable="1">Specifies the path to the converter that allows the view of Microsoft Excel files, in the web interface.</Description>
<Navigation>Frontend::Agent::MIMEViewer</Navigation>
<Value>
<Item ValueType="String" ValueRegex="">xlhtml</Item>
</Value>
</Setting>
<Setting Name="MIME-Viewer###application/msword" Required="0" Valid="0">
<Description Translatable="1">Specifies the path to the converter that allows the view of Microsoft Word files, in the web interface.</Description>
<Navigation>Frontend::Agent::MIMEViewer</Navigation>
<Value>
<Item ValueType="String" ValueRegex="">wvWare</Item>
</Value>
</Setting>
<Setting Name="MIME-Viewer###application/pdf" Required="0" Valid="0">
<Description Translatable="1">Specifies the path to the converter that allows the view of PDF documents, in the web interface.</Description>
<Navigation>Frontend::Agent::MIMEViewer</Navigation>
<Value>
<Item ValueType="String" ValueRegex="">pdftohtml -stdout -i</Item>
</Value>
</Setting>
<Setting Name="MIME-Viewer###text/xml" Required="0" Valid="0">
<Description Translatable="1">Specifies the path to the converter that allows the view of XML files, in the web interface.</Description>
<Navigation>Frontend::Agent::MIMEViewer</Navigation>
<Value>
<Item ValueType="String" ValueRegex="">&lt;OTRS_CONFIG_Home&gt;/scripts/tools/xml2html.pl</Item>
</Value>
</Setting>
<Setting Name="WebUserAgent::Timeout" Required="1" Valid="1" ConfigLevel="200">
<Description Translatable="1">Sets the timeout (in seconds) for http/ftp downloads.</Description>
<Navigation>Core::WebUserAgent</Navigation>
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Output/HTML/ArticleAttachment/HTMLViewer.pm
Expand Up @@ -40,7 +40,7 @@ sub Run {
# check if config exists
if ( $ConfigObject->Get('MIME-Viewer') ) {
for my $Key ( sort keys %{ $ConfigObject->Get('MIME-Viewer') } ) {
if ( $Param{File}->{ContentType} =~ /^Key/i ) {
if ( $Param{File}->{ContentType} =~ /^$Key/i ) {
return (
%{ $Param{File} },
Action => 'Viewer',
Expand Down

0 comments on commit f6fe8ca

Please sign in to comment.