[Bug]: Subsonic token logins and API keys aren't rate limited
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- api, authentication
Research direction
Start at sign_in in src/api/subsonic/mod.rs (around line 225), where the t/s token branch and the apiKey branch skip throttle.guess. Read the plain-password branch just above to see the existing guess/right pattern, then apply it to both paths. Done means a loop of /rest/ping?u=<real user>&t=<random>&s=x eventually returns throttling instead of endless error 40, and a valid token or key calls state.throttle.right(ip). Note the reporter has not run a server, so verify against the existing subsonic test setup.
Written by the indexing model from the issue text.
Description
[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a code review session with @PhrolovaMoe. It was found by reading the code and hasn't been reproduced on a running server.
Version
0.40.0 (feat/desktop, 017a837b)
Area
Other
What happened?
In the Subsonic API's sign_in, only plain-password attempts and unknown usernames spend a throttle guess. The t/s token path (src/api/subsonic/mod.rs:225) and the apiKey path never call throttle.guess, so app passwords and API keys can be guessed as fast as the server answers.
Steps to reproduce
Send /rest/ping?u=<real user>&t=<random>&s=x in a loop: every request gets error 40 and none get throttled.
Expected behavior
Wrong tokens and API keys spend a guess like wrong passwords do, and right ones give it back.
Suggested fix
Call state.throttle.guess(ip) before checking a token or API key and state.throttle.right(ip) when it matches.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 1
- Avg merge
- 4h 49m
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tinystream-dev/tinystream
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
tinystream-dev/tinystream#132 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
tinystream-dev/tinystream#131 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
tinystream-dev/tinystream#129 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
tinystream-dev/tinystream#128 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tinystream-dev/tinystream#124 ·
All issues in tinystream-dev/tinystream
Similar issues
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
sandbox-quantum/switch#2163 ·
Maintainers usually reply within 1 day
-
automated issue report
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area/dashboard kind/bug QA/dev-automation
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pydantic/pydantic-ai#13939 ·
Maintainers usually reply within 1 day
-
self-host
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
funmusicplace/mirlo#2625 ·
Maintainers usually reply within 1 day