fix : correctifs 002 a 006 et de 008 a 019

This commit is contained in:
2026-03-18 10:12:33 +01:00
parent fb1aaac418
commit 0dddecd08f
12 changed files with 89 additions and 61 deletions

View File

@@ -135,7 +135,7 @@ send_discord_message() {
return 0
fi
payload="$(python3 -c 'import json,sys; print(json.dumps({"content": sys.argv[1]}))' "$message")" || {
payload="$(jq -n --arg content "$message" '{content: $content}')" || {
log "Impossible de construire le payload JSON Discord."
return 0
}
@@ -376,6 +376,10 @@ if [[ -n "$LOCAL_ROLES_FILE" ]]; then
if [[ -s "$ROLES_CREATE_LIST" ]]; then
while IFS= read -r role_name; do
[[ -z "$role_name" ]] && continue
if [[ ! "$role_name" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
log "WARNING: nom de rôle suspect ignoré : ${role_name}"
continue
fi
ROLE_EXISTS="$(
psql -h "$PGHOST" -p "$PGPORT" -U "$PGUSER" -d postgres -tAc \