cics - bugs, SQL - injections (security) and other problems

I tried this extention on system but i now problems. Sorry for english. Need help! Otrs 2.4.5, ubuntu 7.04 1 - Not Event Based Notifications after installing this extentions event based notifications is not working anymore but before on Otrs 2.4.5 fine 2 - Memory Leak i use mod_perl, after 1 h httpd take over 260mb Otrs is geting slow 3 - count of all tickets in escalation view not colected to the real count of tickets i found hard coded IDs in module Kernel/System/Ticket/IndexAccelerator/RuntimeDB.pm line 91, my IDs in db is different # CiCS-capeIT my $ViewableState = $Param{ViewableState} || 0; if ( $ViewableState ) { @ViewableLockIDs = ('1','2','3') } # EO CiCS-capeIT if (@QueueIDs) { my $SQL = "SELECT count(*) FROM ticket st WHERE " . " st.ticket_state_id IN ( ${\(join ', ', @ViewableStateIDs)} ) AND " . " st.queue_id IN ("; 4 - agent group permissions get ignored and SQL injections (security) I found Kernel/Output/HTML/CustomerUserTicketCount.pm and us it. But it shown more tickets as i find in system with my agent. As i can see no agent permission check is in. Also security issues found, SQL injection possible - just add SQL to From line of every incoming email and it get executed. my $SQL = "SELECT count(*) " ."FROM ticket t " ."WHERE " . " LOWER(customer_id) = '" . lc( $Param{Data}->{UserCustomerID} ) . "' "; my $Count = 0; $Self->{DBObject}->Prepare( SQL => $SQL.$SQLExt ); while ( my @Row = $Self->{DBObject}->FetchrowArray() ) { $Count = $Row[0]; } 5 - count of all tickets are not collected to the real count of tickets In file Kernel/Modules/AgentTicketQueue.pm i found hard coded IDs again. # CiCS-capeIT # $Self->{ViewAll} = $Self->{ParamObject}->GetParam( Param => 'ViewAll' ) || 0; my %Preferences = $Self->{UserObject}->GetPreferences(UserID => $Self->{UserID}); $Self->{ViewAll} = $Self->{ParamObject}->GetParam( Param => 'ViewAll' ) || $Preferences{ViewAllTickets} || '0'; my @ViewableLockIDs = $Self->{LockObject}->LockViewableLock( Type => 'ID' ); if ( $Self->{ViewAll} ) { @ViewableLockIDs= qw(1 2 3); } $Self->{ViewableLockIDs} = \@ViewableLockIDs; # EO CiCS-capeIT 6 - broken signs in AgentTicketZoom i use GB2312 becaus of local email clients of clients, not utf8. But I see utf8 is hard coded in ticket zoom. before was working fine on Otrs 2.4.5 - maybe the problem is: use utf8; utf8::decode( $Param{ArticleContentFilterString} ); 7 - problems with GUI see pics 8 - 50% on translation is missing see pics 9 - many patched files i see also Kernel/System/Ticket.pm in package - so it seems if i install new Otrs no new patches of new patch release get applied (this is maybe reason on 1, see also http://bugs.otrs.org/show_bug.cgi?id=4257 which was already fixed on Otrs 2.4.5)

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Nyung Zu,
1 - Not Event Based Notifications after installing this extentions event based notifications is not working anymore but before on Otrs 2.4.5 fine
...see (9)
2 - Memory Leak i use mod_perl, after 1 h httpd take over 260mb Otrs is geting slow
Sorry to read that. But this is hard to reproduce, so far we have not experienced issues with that an various environments from Debian to Windows. But we'll have a look at it.
3 - count of all tickets in escalation view not colected to the real count of tickets i found hard coded IDs in module Kernel/System/Ticket/IndexAccelerator/RuntimeDB.pm line 91, my IDs in db is different
We'll add a fix for this.
4 - agent group permissions get ignored and SQL injections (security)
I found Kernel/Output/HTML/CustomerUserTicketCount.pm and us it. But it shown more tickets as i find in system with my agent. As i can see no agent permission check is in.
OK, we found that the count of customer tickets should not depend on the agents rights. Even though the agents is not allowed to see all tickets, (s)he should know how many tickets does the customer have. Actually Kernel/Output/HTML/CustomerUserTicketCount.pm was just a quick and dirty workaround to get a faster count on the ticket, because in earlier OTRS relases the count via TicketSearch was not very good in respect to performance.
Also security issues found, SQL injection possible - just add SQL to From line of every incoming email and it get executed.
This is a very bad bug and will be fixed ASAP. Sorry for the inconvenience and thousand thanks for telling.
5 - count of all tickets are not collected to the real count of tickets
In file Kernel/Modules/AgentTicketQueue.pm i found hard coded IDs again. # CiCS-capeIT # $Self->{ViewAll} = $Self->{ParamObject}->GetParam( Param => 'ViewAll' ) || 0; my %Preferences = $Self->{UserObject}->GetPreferences(UserID => $Self->{UserID}); $Self->{ViewAll} = $Self->{ParamObject}->GetParam( Param => 'ViewAll' ) || $Preferences{ViewAllTickets} || '0';
my @ViewableLockIDs = $Self->{LockObject}->LockViewableLock( Type => 'ID' ); if ( $Self->{ViewAll} ) { @ViewableLockIDs= qw(1 2 3); } $Self->{ViewableLockIDs} = \@ViewableLockIDs;
# EO CiCS-capeIT
Of course these hard coded ids should NOT be there...
6 - broken signs in AgentTicketZoom
i use GB2312 becaus of local email clients of clients, not utf8. But I see utf8 is hard coded in ticket zoom. before was working fine on Otrs 2.4.5 - maybe the problem is:
use utf8; utf8::decode( $Param{ArticleContentFilterString} );
So you're encountering these problems when filtering the article list or in any case?
7 - problems with GUI see pics
This is a problem with the fixed navbar. You may switch it of in your personal settings.
8 - 50% on translation is missing see pics
OK, this is mostly due to our lousy language knowledge. As a matter of fact it's restricted to English and German... :(
9 - many patched files i see also Kernel/System/Ticket.pm in package - so it seems if i install new Otrs no new patches of new patch release get applied (this is maybe reason on 1, see also http://bugs.otrs.org/show_bug.cgi?id=4257 which was already fixed on Otrs 2.4.5)
...actually these patches should already be included. I'll talk to the responding developers soon. Nevertheless it not possible to avoid patching some files for these extensions, because some parts of the original OTRS-code just do not allow own extensions. But hopefully we'll have a solution for this soon. regards, T. - -- Torsten Thau, Dipl. Inform. c.a.p.e. IT Labs GbR - Annaberger Str. 240 - D-09125 Chemnitz phone: +49 371 5347 623 cell: +49 176 66 680 680 personal pgp-key: 0x93E0A174 fax: +49 371 5347 625 http://www.cape-it.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkslA3UACgkQvXo8m5PgoXS3XQCeKCEligw5TFMNZm5OXi3vekkb Th4Anjv1qaSM/DABCLWthdEE/+JB/YNo =12lO -----END PGP SIGNATURE-----
participants (2)
-
Nyung Zu
-
Torsten Thau