Issabel ISO (Latest): Download Here
Cloud Services: User Portal - Quick Guide
News: Telegram channel
Become a Patron!
  • General
  • Security Audit menu shows wrong year.

In /var/log/issabel/audit.log-*, if you have log data in 2024 such as in Nov month, when we go to Audit menu and select Filters, you will see 2025-11-XX which is wrong. It should be 2024-11-XX. So I drilled down to the php code and made some changes as below.

  1. In /var/www/html/libs/misc.lib.php at function writeLOG.
    fwrite($fp,date("[M Y d H:i:s]")." $log\n"); // insert Y in date function.

  2. In /var/www/html/modules/asterisk_log/libs/LogParser_Full.class.php at private function _obtenerFechaPrefijoLinea
    '/[(\w{3}\s+\d+\s+\d{4}\s+\d{2}:\d{2}:\d{2})]/',
    // '/[(\w{3}\s+\d+\s+\d{2}:\d{2}:\d{2})]/', // [Jun 6 04:02:01] VERBOSE[3708] logger.c: Asterisk Event Logger restarted

  3. Insert the desired year (YYYY) in all audit.log file.

    sed -i -E 's/([[A-Za-z]{3} [0-9]{1,2} )([0-9]{2}:[0-9]{2}:[0-9]{2})/\1 YYYY \2/' audit.log

After that, you will see the 2024-11-XX in the Filters correctly. Hope this helps everyone who encounters this problem.

    Correction !!! The Y in date function must be like below.
    fwrite($fp,date("[M d Y H:i:s]")." $log\n"); // insert Y in date function.

      Write a Reply...