locallibrary: a {secret:} filled into a URL query can come back to its plugin

クローズ 初心者向け
#285 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
backend, security

調査の方向性

crates/locallibrary/src/plugin/net.rs の187行目付近を読み、エコーされたリクエストURL内の {account:<id>} 値に対する既存の書き換え処理を追ってください。クエリパラメーターに埋め込まれる {secret:<key>} 値にも同じ動作を適用し、エコーされたURLに関する該当テストを確認してください。URLをエコーするレスポンスが、埋め込まれたsecretをプラグインに漏らさなくなれば完了です。

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

説明

bug locallibrary: plugins

Since cutenode/localnetwork#263, when an answer says a request's address back (in a header or its text), the host turns an account token it put in the query back into {account:<id>}, so the plugin never sees it. A {secret:<key>} filled into a query value (net.rs:187) gets no such rewriting, so a service that echoes the URL hands the secret to the plugin. Secrets should be rewritten back to {secret:<key>} the same way.

Where: crates/locallibrary/src/plugin/net.rs. Query values with {secret:<key>} are filled at L258 but never recorded, and named (L311) rewrites only in_query's account tokens. Record each secret filled into the query with its placeholder (raw and URL-encoded) and rewrite it the same way. Start after cutenode/localnetwork#328 (LOC-131) merges, since it changes this file.

Test: like the account test at crates/locallibrary/tests/it/plugins/accounts.rs L713, a server that echoes the URL in a header and the body gives the plugin {secret:<key>}, never the value.

主要言語
Rust
スター
0
フォーク
0
平均マージ
10時間 15分
マージ済み PR(30日)
401

環境構築

はじめの一歩

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

cutenode/localnetwork のほかの issue

cutenode/localnetwork の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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