Repository navigation
fix(auth): keep a provider wildcard inside the provider it names - #15415
Merged
diegosouzapw merged 1 commit intoOct 6, 2026
Merged
Conversation
A restricted key allowed `cline/*` matched every candidate that started with `cline/`. Alias expansion turns another provider's model into `cline/openrouter/deepseek/...`, which still starts with `cline/`, so the key was handed models it never allowed. A `provider/*` entry still covers that provider's own models, including ids whose model segment contains a slash. It no longer covers a different registered provider nested under the same prefix. Signed-off-by: Minxi Hou <houminxi@gmail.com>
diegosouzapw
merged commit Oct 6, 2026
7daf296
into
diegosouzapw:release/v3.8.52
42 of 51 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cline/*matched every candidate starting withcline/. Alias expansion turns another provider's model intocline/openrouter/deepseek/..., which still starts withcline/, so the key received models it never allowed.provider/*entry still covers that provider's own models, including ids whose model segment contains a slash. It no longer covers a different registered provider nested under the same prefix.Related Issues
Validation
node --import tsx/esm --test tests/unit/allowlist-alias-root-collision.test.ts(2 pass)eslinton the changed files, with the repo suppression filerelease/v3.8.52@23a1148486startsWithmatch makes the wildcard case fail, and the change was restoredTests Added Or Updated
tests/unit/allowlist-alias-root-collision.test.ts(added)Coverage Notes
Reviewer Notes
isModelAllowedForKeyhas six production callers. All of them pass a full model id and read a boolean, so tightening the match does not change their call shape.