[otrs-cvs] ITSMConfigurationManagement/Kernel/Modules AgentITSMConfigItemSearch.pm, 1.34, 1.34.2.1

"CVS commits notifications of OTRS.org" <[email protected]> Fri, 28 Jun 2013 11:15:18 +0000
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/ITSMConfigurationManagement/Kernel/Modules
In directory lancelot:/tmp/cvs-serv21671/Kernel/Modules

Modified Files:
      Tag: rel-3_1
	AgentITSMConfigItemSearch.pm 
Log Message:
Fixed bug# 9547 - XSS and SQL injection vulnerability in module AgentITSMConfigItemSearch on parameter ClassID.

Author: ub

Index: AgentITSMConfigItemSearch.pm
===================================================================
RCS file: /home/cvs/ITSMConfigurationManagement/Kernel/Modules/AgentITSMConfigItemSearch.pm,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -2 -u -d -r1.34 -r1.34.2.1
--- AgentITSMConfigItemSearch.pm	21 Nov 2012 10:21:39 -0000	1.34
+++ AgentITSMConfigItemSearch.pm	28 Jun 2013 11:15:13 -0000	1.34.2.1
@@ -1,5 +1,5 @@
 # --
-# Kernel/Modules/AgentITSMConfigItemSearch.pm - the OTRS::ITSM config item search module
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Kernel/Modules/AgentITSMConfigItemSearch.pm - the OTRS ITSM config item search module
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -86,4 +86,12 @@
     my $ClassID = $Self->{ParamObject}->GetParam( Param => 'ClassID' );
 
+    # check if class id is valid
+    if ( $ClassID && !$ClassList->{$ClassID} ) {
+        return $Self->{LayoutObject}->ErrorScreen(
+            Message => 'Invalid ClassID!',
+            Comment => 'Please contact the admin.',
+        );
+    }
+
     # get single params
     my %GetParam;
@@ -402,5 +410,6 @@
         my $URL
             = "Action=AgentITSMConfigItemSearch;Profile=$Self->{Profile};"
-            . "TakeLastSearch=1;StartHit=$Self->{StartHit}";
+            . "TakeLastSearch=1;StartHit=$Self->{StartHit};Subaction=Search;"
+            . "OrderBy=$Self->{OrderBy};SortBy=$Self->{SortBy}";
 
         if ($ClassID) {
---------------------------------------------------------------------
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