[Bug]: Subsonic POST stream/download ignores credentials in the form body

Aberta
#111 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
65/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
api, backend

Direção de pesquisa

Start at src/api/subsonic/mod.rs:324, where stream/download hand the raw request straight to the file response without reading the body. Read how the other endpoints parse the form body and validate u/p/t/s/id, then see what the file response builder actually needs from the request (method and Range header) so it can be constructed from those parts. Done when the curl command in the issue authenticates and returns audio, and the existing subsonic tests still pass.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug

[!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?

For stream and download, rest never reads the request body so it can hand the request to the file response (src/api/subsonic/mod.rs:324). A client using the advertised formPost extension sends u, p/t/s and id in the body, so those requests fail with "required parameter is missing: u".

Steps to reproduce

curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'u=me&p=…&c=test&id=…' http://host/rest/stream

Expected behavior

POST stream/download authenticate and play like every other endpoint.

Suggested fix

Read and parse the form body for these too, then build the file response from the remaining request parts (method and Range headers) instead of the original Request.

Linguagem predominante
TypeScript
Estrelas
4
Forks
1
Merge médio
4h 49min
PRs com merge (30d)
5

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de tinystream-dev/tinystream

Todas as issues de tinystream-dev/tinystream

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.