[freeside-commits] branch FREESIDE_3_BRANCH updated. 4de00d361a1e3d477458f872972dde56d8bc2d9c

Ivan Kohler ivan at freeside.biz
Wed Jul 3 13:40:12 AKDT 2024


The branch, FREESIDE_3_BRANCH has been updated
       via  4de00d361a1e3d477458f872972dde56d8bc2d9c (commit)
      from  a39cce659ce5811bc6d061c6db7e16ac1bcc4c45 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4de00d361a1e3d477458f872972dde56d8bc2d9c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jul 3 14:40:11 2024 -0700

    update for current EOL dates

diff --git a/httemplate/elements/header-full.html b/httemplate/elements/header-full.html
index 26eab3146..34c795cb1 100644
--- a/httemplate/elements/header-full.html
+++ b/httemplate/elements/header-full.html
@@ -94,7 +94,7 @@ Example:
         <TR>
           <TD COLSPAN=4>
             <IMG SRC="<% $fsurl %>images/error.png">
-            <FONT COLOR="#FF0000" SIZE="+1"><% $top_warning %></FONT>
+            <FONT COLOR="#FF0000" SIZE="+1"><% $top_warning |n %></FONT>
           </TD>
         </TR>
 %     }
@@ -255,22 +255,45 @@ if ( scalar(@agentnums) == 1 ) {
 }
 
 my @top_warnings = ();
+
 my $deb_version = int(slurp('/etc/debian_version'));
 #per wiki.debian.org/LTS
 push @top_warnings, deb_warning($deb_version)
-  if ( $deb_version <= 8 )
-  or ( $deb_version == 9  && time > 1656658800 ) #7/1/2022
-  or ( $deb_version == 10 && time > 1719817200 ) #7/1/2024
-  or ( $deb_version == 11 && time > 1782889200 ) #7/1/2026
-;
+  if ( $deb_version <= 10 )
+  or ( $deb_version == 11 && time > 1788246000 ) #9/1/2026
+  or ( $deb_version == 12 && time > 1846047600 ) #7/1/2028
+;                                                # ref: wiki.debian.org/LTS
+
+if ( driver_name =~ /^Pg/ ) {
+   my $pg_ver = FS::Record->scalar_sql('SELECT VERSION()');
+   if ( $pg_ver =~ /^\s*PostgreSQL\s+([\d\.]+)\s/ ) {
+     $pg_ver = $1;
+     push @top_warnings, pg_warning($pg_ver)
+       if (     $pg_ver  <= 11 )
+       or ( int($pg_ver) <= 13  && time > 1788246000 ) #9/1/2026
+       or ( int($pg_ver) <= 15  && time > 1846047600 ) #7/1/2028
+     ;
+   } else {
+     warn "Unknown Pg version $pg_ver\n"; #?
+   }
+}
 
 sub deb_warning {
   my $ver = shift;
   <<"END";
 WARNING: Your operating system (Debian v$ver) is EOL and no longer supported.
-This is insecure and a violation of PCI data security standard.
+This is insecure and a violation of the PCI data security standard.
 Contact <a href="mailto:sales\@freeside.biz?subject=Debian OS upgrade">sales\@freeside.biz</a> to schedule an upgrade ASAP.
 END
 }
 
+sub pg_warning {
+  my $ver = shift;
+  <<"END";
+WARNING: Your database (PostgreSQL v$ver) is EOL and no longer supported.
+This is insecure and a violation of the PCI data security standard.
+Contact <a href="mailto:sales\@freeside.biz?subject=PostgreSQL DB upgrade">sales\@freeside.biz</a> to schedule an upgrade ASAP.
+END
+}
+
 </%init>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/header-full.html | 37 +++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list