PrevEmployment: add auth + ownership check to PATCH/DELETE/proof endpoints
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Start with api/routers/prev_employment.py and inspect how get_current_student and the ownership check are used for the related issue #138. Apply the same authentication and 404 behavior to the three listed endpoints, then add integration tests for unauthenticated, other-user, and owner requests. Done means all three endpoint cases behave as specified.
索引モデルが issue の本文から書いたものです。
説明
Problem
These endpoints in api/routers/prev_employment.py have no auth dependency and do no ownership check, so anyone can modify, delete or upload proof for any previous-employment entry by id:
PATCH /prev_employments/{prev_employment_id}/proofDELETE /prev_employments/{prev_employment_id}PATCH /prev_employments/{prev_employment_id}
Tasks
- Require
get_current_student - Ownership check: entry must have
user_account == user["sub"]; otherwise 404 (no existence leak, consistent with #138) - Integration tests: unauthenticated → 401; other user's entry → 404; owner → success
Related: #138
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 39分
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ClockGU/clockwork-backend のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ClockGU/clockwork-backend#169 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#165 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#164 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#163 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ClockGU/clockwork-backend#162 ·
メンテナーはふだん 1 日以内に返信
ClockGU/clockwork-backend の issue をすべて見る
似ている issue
-
ReadQwen3PaperTask5 rejects correct answers that differ only in order, case, or underscore form対応中かも @Kingpython123 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Tongyi-MAI/MobileWorld#72 ·
-
_threads/application: Update typing annotations using `pyupgrade --py311-plus`対応中かも @gudnimg が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Health probes return 401 when authentication is enabled and the API is served under /orb対応中かも @fgogolli が今日担当しました。 オープンarea: api priority: p2 size: S type: bug
難易度 2/5 半日 初心者へのやさしさ 75/100
finos/open-resource-broker#704 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
BCDA-APS/polar-bits#93 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
GoogleCloudPlatform/gce-rescue#218 ·
メンテナーはふだん 2 日以内に返信