From e201dbb4282a7be21c464792f42cb0a3da919b2c Mon Sep 17 00:00:00 2001 From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Fri, 1 May 2026 04:45:03 +0300 Subject: [PATCH] Autocommit in repo: ros.vados.ru, generated by owner: root, in 04:45:02 01.05.2026. --- html/AM-GlobalFunc.rsc | 4 ++-- html/global-functions.rsc | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index c5551a47a..3e560ed45 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -17,9 +17,9 @@ :global GlobalFuncReady false; # Git commit id & info, expected configuration version -:global CommitId "main/346/bb13b669"; +:global CommitId "main/347/81bfb1ca"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 04:05:02 01.05.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 04:45:02 01.05.2026."; # The variables are received right here. :global GlobalConfVersion 138; diff --git a/html/global-functions.rsc b/html/global-functions.rsc index cb74f991e..10a9b5acc 100644 --- a/html/global-functions.rsc +++ b/html/global-functions.rsc @@ -15,7 +15,7 @@ # Git commit id & info, expected configuration version :global CommitId "unknown"; :global CommitInfo "unknown"; -:global ExpectedConfigVersion 139; +:global ExpectedConfigVersion 143; # global variables not to be changed by user :global GlobalFunctionsReady false; @@ -111,11 +111,13 @@ :local UseFor [ :tostr $2 ]; :global CertificateDownload; - :global EitherOr; :global LogPrint; :global ParseKeyValueStore; - :set UseFor [ $EitherOr $UseFor "undefined" ]; + :if ([ :len $UseFor ] = 0) do={ + $LogPrint warning $0 ("The intended use is undefined!"); + :set UseFor "undefined"; + } :if ([ /system/resource/get free-hdd-space ] < 8388608 && \ [ /certificate/settings/get crl-download ] = true && \ @@ -189,7 +191,12 @@ $LogPrint warning $0 ("Failed downloading certificate with CommonName '" . $CommonName . \ "' from repository! Trying fallback to mkcert.org..."); :do { - :if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0) do={ + :local CertSettings [ /certificate/settings/get ]; + :if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0 && \ + !((($CertSettings->"builtin-trust-anchors") = "trusted" || \ + ($CertSettings->"builtin-trust-store") ~ "fetch" || \ + ($CertSettings->"builtin-trust-store") = "all") && \ + [ :len [ /certificate/builtin/find where common-name="ISRG Root X1" ] ] > 0)) do={ $LogPrint error $0 ("Required certificate is not available."); :return false; } -- 2.52.0