From 0bb085214a008337077fd9acc1b4e2006023c8fe Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Sat, 14 Feb 2026 02:10:11 -0800 Subject: [PATCH] fix: Properly handle comma-separated auth vars in key-request.sh (#1083) * fix: Properly handle comma-separated auth vars in key-request.sh The tr command was incorrectly translating each character in '+,' to newline, causing "ALIYUN_ACCESS_KEY_ID, ALIYUN_ACCESS_KEY_SECRET" to not be split properly. Also updated get_cloud_env_vars to split on both + and , separators. Fixes the error: "ALIYUN_ACCESS_KEY_ID, ALIYUN_ACCESS_KEY_SECRET: invalid variable name" Co-Authored-By: Claude Sonnet 4.5 * fix: Revert sed to tr for macOS bash 3.x compatibility As requested in security review - BSD sed treats \n in replacement as literal backslash-n, not newline. tr already handles both + and , delimiters correctly on all platforms. Addresses security review feedback. --------- Co-authored-by: Spawn QA Bot Co-authored-by: Claude Sonnet 4.5 Co-authored-by: Spawn Refactor Service --- shared/key-request.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/key-request.sh b/shared/key-request.sh index f29cdf87..107bd5ca 100644 --- a/shared/key-request.sh +++ b/shared/key-request.sh @@ -29,7 +29,7 @@ m = json.load(open(sys.argv[1])) auth = m.get('clouds', {}).get(sys.argv[2], {}).get('auth', '') if re.search(r'\b(login|configure|setup)\b', auth, re.I): sys.exit(0) -for var in re.split(r'\s*\+\s*', auth): +for var in re.split(r'\s*[+,]\s*', auth): v = var.strip() if v: print(v)