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

オープン
#2,252 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C
スター
3
フォーク
7
平均マージ
6時間 32分
マージ済み PR(30日)
285

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InauguralSystems/EigenScript のほかの issue

InauguralSystems/EigenScript の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。