diff options
author | Ivan Kohler <ivan@freeside.biz> | 2024-07-03 14:40:11 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2024-07-03 14:40:11 -0700 |
commit | 4de00d361a1e3d477458f872972dde56d8bc2d9c (patch) | |
tree | da25fd1a18c6b0a1a968b1601c0ceccb1759b8c1 | |
parent | a39cce659ce5811bc6d061c6db7e16ac1bcc4c45 (diff) |
update for current EOL dates
-rw-r--r-- | httemplate/elements/header-full.html | 37 |
1 files changed, 30 insertions, 7 deletions
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> |