fix: strip taler:// default :443/:80 in bank mint consumers

Align demo-withdraw-api, goa-withdraw-ladder, refresh-demo-withdraw,
amount-ladder bench, and extreme tests with mon normalize rules so
libeufin host:443 never reaches wallets or QR payloads.
This commit is contained in:
Hernâni Marques 2026-07-19 15:38:34 +02:00
parent 947c72e595
commit dc94b30fed
No known key found for this signature in database
5 changed files with 51 additions and 12 deletions

View file

@ -7,9 +7,10 @@
# 3) wallet-cli: ToS + accept-uri + run-until-done each rung
# 4) amounts from atomic-GOA up until bank/wallet fails
#
# Prefer the monitoring phase (random increasing ranges + timings + report):
# ../taler-monitoring/taler-monitoring.sh ladder
# LADDER_MAX_RUNGS=10 ../taler-monitoring/check_goa_ladder.sh
# Prefer the monitoring amount ladder (modular wd + pay):
# cd ~/src/taler-monitoring && ./taler-monitoring.sh -d hacktivism.ch ladder
# ./taler-monitoring.sh max-ladder # highest withdrawable + payable
# LADDER_STEPS=10 LADDER_PAY=0 ./taler-monitoring.sh ladder
#
# Usage (standalone, fixed ladder):
# ./goa-withdraw-ladder.sh
@ -53,7 +54,7 @@ wcli() {
}
# Default ladder via Python: fixed 0 + random low picks + random high ranges + fixed max.
# Prefer taler-monitoring check_goa_ladder.sh for full control (LADDER_* env).
# Prefer taler-monitoring check_amount_ladder.sh (+ ladder/lib_pay.sh) for LADDER_* env.
default_amounts() {
python3 - <<'PY'
import math, random
@ -235,7 +236,15 @@ for amt in "${LADDER[@]}"; do
break
fi
WID=$(echo "$WD" | python3 -c 'import json,sys; print(json.load(sys.stdin).get("withdrawal_id",""))')
URI=$(echo "$WD" | python3 -c 'import json,sys; u=json.load(sys.stdin).get("taler_withdraw_uri",""); print(u.replace(":443/","/"))')
URI=$(echo "$WD" | python3 -c '
import json, re, sys
u = json.load(sys.stdin).get("taler_withdraw_uri") or ""
u = re.sub(r"(taler://[A-Za-z0-9._-]+/)([^/?#:]+):443(?=/|$|\?|#)", r"\1\2", u, flags=re.I)
u = re.sub(r"(taler://[A-Za-z0-9._-]+/)([^/?#:]+):80(?=/|$|\?|#)", r"\1\2", u, flags=re.I)
for a, b in ((":443/", "/"), (":443?", "?"), (":80/", "/"), (":80?", "?")):
u = u.replace(a, b)
print(u)
')
[ -n "$WID" ] && [ -n "$URI" ] || {
log "FAIL parse mint: $WD"
echo -e "${n}\t${amt}\tFAIL_PARSE\t-\t" >>"$RESULTS"