Granting a permission to a user id with no account answers 500 instead of 404
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
RBAC の付与ルート POST /api/v1/rbac/users/{user_id}/grant のハンドラーと、すでに 404 を返す兄弟の permissions ルートで使用されているユーザー検索から始めます。存在しない UUID がデータベースエラーではなく 404 を返すように、付与を挿入する前に不足している検索を追加します。また、本文の user_id を破棄するか、パスの ID と一致しない場合に拒否するかを決めます。ユーザー付与と permissions に関する RBAC API テストを実行し、新しい 404 と既存の付与が引き続き機能することを確認します。
索引モデルが issue の本文から書いたものです。
説明
- Sent:
POST /api/v1/rbac/users/{user_id}/grantwith a valid body, where{user_id}is a well-formed UUID that
belongs to no account. - Comes back: 500 with the generic error body. The grant is inserted without looking the user up, and the database
refuses the row. Nothing is saved. - Expected: 404 "User not found", as
GET /api/v1/rbac/users/{user_id}/permissionsanswers for the same id. - Also: the body's required
user_idis not used (the path's id is); either drop it or refuse a body whose
user_iddiffers from the path, as the counter routes do (#95). - Reproduction (ADMIN):
curl -X POST -H "Authorization: Bearer <ADMIN token>" -H 'Content-Type: application/json' \ -d '{"user_id":"00000000-0000-0000-0000-000000000001","resource":"experiment","actions":["read"]}' \ http://localhost:8000/api/v1/rbac/users/00000000-0000-0000-0000-000000000001/grant
Found by API fuzzing (a local run), reproduced by hand.
- 主要言語
- Python
- スター
- 0
- フォーク
- 4
- 平均マージ
- 5時間 19分
- マージ済み PR(30日)
- 503
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Controlvar/controlvar のほかの issue
-
Dashboard: the sequential panel's "Ready to stop" banner shows no sample-ratio-mismatch cautionオープンbug post-launch
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Controlvar/controlvar#1737 ·
メンテナーはふだん 1 日以内に返信
-
fix(api): the feature-flag list has no defined order across pages対応中かも @amarkanday が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Controlvar/controlvar#1612 ·
メンテナーはふだん 1 日以内に返信
-
bug post-launch
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Controlvar/controlvar#1562 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Controlvar/controlvar#1447 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Experiment setup: emptying a traffic share box and typing a number shows a leading zero ("034")オープンbug post-launch
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Controlvar/controlvar#1428 ·
メンテナーはふだん 1 日以内に返信
Controlvar/controlvar の issue をすべて見る
似ている issue
-
curriculum documentation quality
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
githubnext/gh-aw-workshop#5367 ·
メンテナーはふだん 3 日以内に返信
-
Create Noise Latents ignores randomize_seed and produces the same noise every run対応中かも @griptapeops が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
griptape-ai/griptape-nodes-library-diffusers#127 ·
メンテナーはふだん 1 日以内に返信
-
Jenkins capacity report: metrics history is lost when archiving a month fails対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
adoptium/infrastructure#4568 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
huggingface/deep-rl-class#723 ·
-
premises-missing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
WingedGuardian/GENesis-AGI#3928 ·
メンテナーはふだん 1 日以内に返信