[freeside-commits] branch master updated. 71e4f7492bc02c5444af70460d678fe26ff8151c

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


The branch, master has been updated
       via  71e4f7492bc02c5444af70460d678fe26ff8151c (commit)
      from  205a8661156e586638f4ca073041cf300f967c23 (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 71e4f7492bc02c5444af70460d678fe26ff8151c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jul 3 14:40:06 2024 -0700

    update for current EOL dates

diff --git a/httemplate/elements/header-full.html b/httemplate/elements/header-full.html
index a56e0b183..7baacf7cb 100644
--- a/httemplate/elements/header-full.html
+++ b/httemplate/elements/header-full.html
@@ -100,7 +100,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>
 %     }
@@ -285,22 +285,45 @@ my %status_color = ( 'status' => '#eeffee', 'warning' => '#fefbd0', 'error' => '
 my %status_image = ( 'status' => 'images/tick.png', 'warning' => 'images/tick.png', 'error' => 'images/error.png', );
 
 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