Re: Bug: IPCop v2.0.2 Missing logs after year change
Eric Oberlander <[email protected]>
| Newsgroups | gmane.comp.security.ipcop.devel |
|---|---|
| Message-ID | <CAPkz44G2z1KtD_FA68zFteyRhO3uUPwm8zOP7YDAYvVTde5j_w@mail.gmail.com> |
Hi Bob On 1 January 2012 13:28, Bob Brewer <[email protected]> wrote: > Previous days Logs before the year change are missing after the year > changed to 2012 in the Proxy Logs, Firewall Logs and System Logs cgi's > > If the date is changed with the << and >> buttons the date is displayed > as 2103 eg "Total Hits for Log Section ipcop 2013-01-01: 4" although the > log details appear to be correct. The year is corrected if older/ newer > is selected. Thanks for your report. I can reproduce it here. Looking at the code in logsystems.cgi, it looks like when the buttons '<<' or '>>' are pressed, the validdatedate subroutine is skipped, so that the year is not decremented, which is task carried out by that routine. I can partly fix it with this patch --- logsystem.cgi-orig 2012-01-02 14:07:13.000000000 +0000 +++ logsystem.cgi 2012-01-02 14:35:55.000000000 +0000 @@ -124,12 +124,11 @@ $cgiparams{'MONTH'} = $temp_then[4]; $cgiparams{'DAY'} = $temp_then[3]; } -else { - @temp_then = &General::validatedate(0, $cgiparams{'MONTH'}, $cgiparams{'DAY'}); - $year = $temp_then[5]+1900; - $cgiparams{'MONTH'} = $temp_then[4]; - $cgiparams{'DAY'} = $temp_then[3]; -} + +@temp_then = &General::validatedate(0, $cgiparams{'MONTH'}, $cgiparams{'DAY'}); +$year = $temp_then[5]+1900; +$cgiparams{'MONTH'} = $temp_then[4]; +$cgiparams{'DAY'} = $temp_then[3]; # Date to display my $date; However, I can move from April 30 to May 1 with the >> button, but not Feb 28 to March 1, I don't know why yet. March 1 << Feb 28 works OK. Eric ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox