allowInsecureKeySizes flag not present among TS types.
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
調査の方向性
Issue に示されている SignOptions の宣言から始め、package が受け付ける sign() のオプションと比較します。allowInsecureKeySizes が表現されるように宣言を更新し、その後、再現コードで TS2769 が発生しなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Description
I updated from version 8 to 9, and since my RSA keys were not long enough I got the error: "secretOrPrivateKey has a minimum key size of 2048 bits for RS256"
I do not want to change all RSA keys in every environment so I decided to use the flag allowInsecureKeySizes to bypass that new check.
My project is buillt with typescript and if I use that flag with in the options of jwt.sign() method I will see this error:
"TS2769: No overload matches this cal"
Reproduction
jwt.sign({}, privateKey, {
issuer: 'streetcrowd',
subject: provider,
algorithm: 'RS256',
allowInsecureKeySizes: true
});
This is the definition of SignOptions, as you can see, the required flag is missing:
export interface SignOptions {
algorithm?: Algorithm | undefined;
keyid?: string | undefined;
expiresIn?: string | number | undefined;
notBefore?: string | number | undefined;
audience?: string | string[] | undefined;
subject?: string | undefined;
issuer?: string | undefined;
jwtid?: string | undefined;
mutatePayload?: boolean | undefined;
noTimestamp?: boolean | undefined;
header?: JwtHeader | undefined;
encoding?: string | undefined;
}
Environment
- jsonwebtoken 9.0.2
- Node 18
- 主要言語
- JavaScript
- スター
- 18.2k
- フォーク
- 1.3k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
auth0/node-jsonwebtoken のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
auth0/node-jsonwebtoken#1042 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
auth0/node-jsonwebtoken#1000 · コメント 2 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
auth0/node-jsonwebtoken#1048 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
auth0/node-jsonwebtoken#1046 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
auth0/node-jsonwebtoken#1034 ·
auth0/node-jsonwebtoken の issue をすべて見る
似ている issue
-
factory-active factory-automatic harness/codex task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
ux
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
rr-djk/rr-djuikoo.com#53 ·
メンテナーはふだん 1 日以内に返信
-
new spec review
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
w3c/browser-specs#2666 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
thim81/openapi-format#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
decentespresso/dye2#13 ·