[otrs-cvs] FAQ/Kernel/Output/HTML LayoutFAQ.pm,1.51,1.51.2.1
"CVS commits notifications of OTRS.org" <[email protected]> Mon, 25 Mar 2013 17:50:57 +0000
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/FAQ/Kernel/Output/HTML
In directory lancelot:/tmp/cvs-serv25649/Kernel/Output/HTML
Modified Files:
Tag: rel-2_1
LayoutFAQ.pm
Log Message:
Fixed possible security issue by filtering out active HTML content.
Author: ub
Index: LayoutFAQ.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/Output/HTML/LayoutFAQ.pm,v
retrieving revision 1.51
retrieving revision 1.51.2.1
diff -2 -u -d -r1.51 -r1.51.2.1
--- LayoutFAQ.pm 8 Feb 2012 11:05:22 -0000 1.51
+++ LayoutFAQ.pm 25 Mar 2013 17:50:52 -0000 1.51.2.1
@@ -1,5 +1,5 @@
# --
# Kernel/Output/HTML/LayoutFAQ.pm - provides generic agent HTML output
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# $Id$
@@ -430,4 +430,20 @@
my $Content = $Param{FAQData}->{$Field} || '';
+ # remove active html content (scripts, applets, etc...)
+ my %SafeContent = $Self->{HTMLUtilsObject}->Safety(
+ String => $Content,
+ NoApplet => 1,
+ NoObject => 1,
+ NoEmbed => 1,
+ NoIntSrcLoad => 0,
+ NoExtSrcLoad => 0,
+ NoJavaScript => 1,
+ );
+
+ # take the safe content if neccessary
+ if ( $SafeContent{Replace} ) {
+ $Content = $SafeContent{String};
+ }
+
# show the field
$Self->Block(
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log