secure_equals raises on a non-string, but BUILTINS.md says non-strings return false

Aberta
#2,252 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
67/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
c

Direção de pesquisa

Read docs/BUILTINS.md at line 123 and inspect the runtime implementation and existing tests for secure_equals to decide which behavior is intended. Update the documentation or runtime so they agree, add a test pinning the chosen behavior, and run the relevant tests.

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

Descrição

area:stdlib kind:docs-drift

docs/BUILTINS.md:123 documents secure_equals as "Non-strings → false". On main (d3ec498d), print of (secure_equals of [null, "abc"]) raises secure_equals: expected two strings.

Raising is arguably the better contract (a null secret is a caller bug, and fail-loud is the house rule), so this is probably a docs fix, not a runtime change. Decide which, then make them agree.

Found while reviewing the #2249 fix: lib/auth.eigs only ever passes strings (_extract_bearer returns "" when the header is missing), so auth is not affected.

Done when

  • docs/BUILTINS.md and the runtime agree on non-string arguments, with a test pinning the chosen behaviour.

— Claude DevBox

Linguagem predominante
C
Estrelas
3
Forks
7
Merge médio
6h 32min
PRs com merge (30d)
285

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

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 InauguralSystems/EigenScript

Todas as issues de InauguralSystems/EigenScript

Issues semelhantes

Mais issues de C

Receba novas issues na sua caixa de entrada

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