Modify

Ticket #2433 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

90manageEBoxLogs/PgDBEngine.pm: invalid input syntax for integer (dport = '' )

Reported by: bjoern.stuetz@… Owned by: jacalvo@…
Milestone: 2.0.X Component: logs
Severity: normal Keywords: 90manageEBoxLogs Base.pm PgDBEngine.pm dport
Cc:

Description

Hi zentyal-team,

I think a possible glitch in 90manageEBoxLogs respectively Base.pm:1380 can add wrong entries to the log database.

PgDBEngine.pm logs an invalid input syntax for integer (i.e., dport = ) in that case.

Changing Base.pm:1380 from if (exists $r->{$f}) to if (exists $r->{$f} && defined $r->{$f})

helped to prevent the addition of the empty (i.e., ) dport entry to the log database, but I am not sure if that changes what you guys intended. Maybe dport is not taken properly out of the original log entry in every case.

Can you verify this problem?

So long,

Björn

/etc/cron.hourly/90manageEBoxLogs: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/EBox/Module/Base.pm line 1380.

/var/log/ebox/ebox.log: DEBUG> PgDBEngine.pm:328 EBox::PgDBEngine::query - Error querying data: SELECT * FROM firewall_report WHERE event = 'drop' AND source = '0123' AND proto = '2' AND dport = AND date = '2010-10-01 00:00:00' ; , ERROR: invalid input syntax for integer: ""

ebox 2.0.4

Attachments

Change History

comment:1 Changed 3 years ago by anonymous

  • Owner changed from cperez@… to javier.amor.garcia@…

comment:2 Changed 3 years ago by jacalvo@…

  • Owner changed from javier.amor.garcia@… to jacalvo@…
  • Status changed from new to assigned

Thanks for the patch, seems pretty good :)

comment:3 Changed 3 years ago by jacalvo@…

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [19595]) NN: Check for undefined values in logs consolidation (closes #2433)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.