How can I differentiate a tampered signed cookie from a `false` JSON cookie?
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
- 領域
- backend
調査の方向性
まず、署名付きCookieとJSON Cookieについてのcookie-parserドキュメントを確認し、次に、有効な署名付きj:プレフィックス付きfalse値と、失敗した署名との衝突を再現します。現在のAPIがそれらを区別するのに十分な情報を公開しているかを判断し、その結果を文書化するか、必要な動作とその検証ケースを定義してください。
索引モデルが issue の本文から書いたものです。
説明
Forewarning: I am extremely new to Node.js and NPM.
From reading the documentation of cookieParser, it appears that cookies that are signed but fail validation are assigned false in the req.signedCookies object.
Signed cookies that fail signature validation will have the value
falseinstead of the tampered value.
Also, cookies prefixed with j: are automatically parsed with JSON.parse.
In addition, this module supports special "JSON cookies". These are cookie where the value is prefixed with
j:. When these values are encountered, the value will be exposed as the result ofJSON.parse.
However, the string 'false' is valid JSON, so it should get parsed to false. I also found no option to disable the built-in JSON parser. How can I differentiate a valid signed j:'false' cookie from an invalid signed cookie?
If this is not possible, I request that this be relabeled to a bug report or feature request.
- 主要言語
- JavaScript
- スター
- 2k
- フォーク
- 235
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
expressjs/cookie-parser のほかの issue
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
expressjs/cookie-parser#138 ·
-
req.cookies is showing null対応中かも @D-393Patel が 335 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
expressjs/cookie-parser#128 ·
-
perf: limit cookie parse only on some cookie対応中かも @cesco69 が 546 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
expressjs/cookie-parser#126 · リアクション 1 件 ·
-
future question
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
expressjs/cookie-parser#124 · リアクション 7 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
expressjs/cookie-parser#122 · コメント 5 件 ·
expressjs/cookie-parser の issue をすべて見る
似ている issue
-
Notifications pagination accepts NaN and negative LIMIT/OFFSET対応中かも @Senthil455 が今日担当しました。 オープンBUGS MEDIUM
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
elixpo/blogs.elixpo#419 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
immich-app/immich#32426 ·
メンテナーはふだん 1 日以内に返信
-
automated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
lirantal/discoprint#45 ·
メンテナーはふだん 1 日以内に返信