use ${ENV} syntax for env-vars;

only expand environment-variables of the form ${ENV}

by default, crash on startup if the old $ENV syntax is found,
explaning that the old syntax can be enabled with an option
This commit is contained in:
ed
2026-04-20 23:43:00 +02:00
parent b31f29024a
commit cbd82b654a
9 changed files with 101 additions and 23 deletions
+3 -1
View File
@@ -38,7 +38,7 @@ from copyparty.broker_thr import BrokerThr
from copyparty.ico import Ico
from copyparty.u2idx import U2idx
from copyparty.up2k import Up2k
from copyparty.util import FHC, CachedDict, Garda, Unrecv
from copyparty.util import FHC, CachedDict, Garda, Unrecv, expand_osenv_c
init_E(E)
@@ -195,6 +195,7 @@ class Cfg(Namespace):
du_who="all",
dk_salt="b" * 16,
fk_salt="a" * 16,
env_expand=2,
fsnt="lin",
grp_all="acct",
idp_gsep=re.compile("[|:;+,]"),
@@ -217,6 +218,7 @@ class Cfg(Namespace):
rw_edit="md",
s_rd_sz=256 * 1024,
s_wr_sz=256 * 1024,
shenvexp=expand_osenv_c,
shr_who="auth",
sort="href",
srch_hits=99999,