LabTechUDF / LabTechUDF/python-services

Bug: Email action token not enforced or invalidated, allowing multiple actions on the same event

未關閉
#65 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

bug
主要語言
Python
星號
0
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

Preconditions:
An event exists with status pending review.

Steps to Reproduce:

  1. Trigger a status update email for an event (e.g., “Approve” / “Reject”).
  2. Open the email and click the provided action link.
  3. The event status is updated successfully.
  4. Reuse the same link or a different link from the same email.
  5. Observe the behavior.

Expected Result:
The email token is validated and tied to a single action.
Once an action is performed, the token becomes expired/invalid and cannot be reused.
A second attempt with the same token should return an error (e.g., “Token expired or invalid”).
The system should prevent conflicting actions (e.g., approving and then rejecting with the same token).

Actual Result:
The same token can be reused multiple times.
Different actions (approve and reject) can be performed using the same token.
The token is not considered in validation logic after the first use.

'Acceptance Criteria:
Token is strictly validated against the requested action.
After a successful action, the token is invalidated and cannot be reused.
Attempting a second use returns an error message and no status change occurs.
Conflicting actions cannot be performed with the same token.

https://github.com/user-attachments/assets/0aa2a6ab-12e7-4b86-bfc3-53990fc2f93f

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

Issue 中沒有確定原始檔案、測試或進入點。首先定位電子郵件動作權杖處理程式及其驗證路徑;完成的標準是:動作與要求的權杖和動作繫結,成功使用會使權杖失效,而重複使用會回傳錯誤且不變更狀態。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
authentication, security
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。