mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 09:10:55 +00:00
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 <noreply@anthropic.com> * 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 <qa-bot@openrouter.ai> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: Spawn Refactor Service <refactor@spawn.service>
This commit is contained in:
parent
4d67d08487
commit
0bb085214a
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue