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

Offen
#2,252 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
67/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
c

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
C
Sterne
3
Forks
7
Ø Merge
6 Std. 32 Min.
Gemergte PRs (30 T.)
285

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus InauguralSystems/EigenScript

Alle Issues in InauguralSystems/EigenScript

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.