Re: Bug: IPCop v2.0.2 Missing logs after year change
Olaf Westrik <weizen_42-Yz37vSk3/[email protected]>
| Newsgroups | gmane.comp.security.ipcop.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2012-01-02 16:36, Eric Oberlander 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 It is slightly more subtle than that :-( > 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. calculatedate() increased the date to 2012-02-29, after that validatedate() first decreases the year to 2011 and notices (correctly) that 2011-02-29 does not exist, thus descreasing the date to 2011-02-28. I'll add some tweaking in calculatedate(), so it returns the correct date. Olaf ------------------------------------------------------------------------------ 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