Repository navigation
Conversation
…r's Filters list `_get_multiple` read `Filters` straight out of `sdk_options` and appended the `name` filter onto that same list object. When a caller passes a shared or module-level `Filters` value, every call leaves one extra `name` filter behind, so the next request goes out with a stale filter and can return secrets that were never asked for. Copy the list before appending so the caller's value is left untouched. Signed-off-by: ShussMiao <168898188+ShussMiao@users.noreply.github.com>
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
|
Thanks @ShussMiao, the fix is right, but #8604 by @wanjinhao1 had already landed this same change for #8596 a few days before you opened this, so I'm closing it as a duplicate. Your other PR, #8691, is merged and you're credited in 3.39.0. There are more |



Issue number: closes #8596
Summary
Changes
SecretsProvider._get_multipletook theFiltersvalue straight out ofsdk_optionsand appended the generatednamefilter onto that same list object, so a caller-owned list was mutated in place. It now copies the list before appending.Adds a regression test that reuses one caller-owned
Filterslist across twoget_multiplecalls and asserts, viaStubberexpected parameters, that each request carries exactly the caller's filter plus the currentnamefilter — and that the caller's list is unchanged afterwards.User experience
Callers that pass a shared or module-level
Filterslist (as the docs example shows) no longer accumulate a stalenamefilter on every call, so a second request can no longer return secrets that were not asked for.Testing
tests/functional/parameters/— 184 passed. The new test fails on the previous code with the second request carrying three filters, and passes after the copy.ruff checkandruff format --checkare clean on both files.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.