Skip to content

Fix TypeError on bare-string master responses to pillar requests #69260

Open
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:69228-3006
Open

Fix TypeError on bare-string master responses to pillar requests #69260
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:69228-3006

Conversation

@dwoz
Copy link
Copy Markdown
Contributor

@dwoz dwoz commented May 29, 2026

fixes #69228

When the master returns a bare string error ("bad load", "Some exception handling minion payload",
"Server-side exception handling payload") for a pillar request, the minion's crypted_transfer_decode_dictentry crashed with "TypeError: string indices must be integers" at ret["key"]. The "key" not in ret guard accidentally passed for strings (substring check), the post-reauth retry returned the same string, and the indexing blew up.

Raise a clean AuthenticationError when the post-reauth response is still not a dict containing "key", so the caller can fail or retry instead of crashing. Matches the cluster_retry-decorated guard already on 3008.x / master (commit 2efc32e).

Add a parametrized regression test covering all three server-side string error returns.

…tstack#69228)

When the master returns a bare string error ("bad load",
"Some exception handling minion payload",
"Server-side exception handling payload") for a pillar request, the
minion's crypted_transfer_decode_dictentry crashed with
"TypeError: string indices must be integers" at ret["key"]. The "key"
not in ret guard accidentally passed for strings (substring check), the
post-reauth retry returned the same string, and the indexing blew up.

Raise a clean AuthenticationError when the post-reauth response is still
not a dict containing "key", so the caller can fail or retry instead of
crashing. Matches the cluster_retry-decorated guard already on 3008.x /
master (commit 2efc32e).

Add a parametrized regression test covering all three server-side string
error returns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant