LabTechUDF / LabTechUDF/python-services

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

Aperta
#65 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Python
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Nell’issue non sono identificati file sorgente, test o punti di ingresso. Inizia individuando il gestore dei token di azione e-mail e il relativo percorso di validazione; il lavoro è completato quando le azioni sono associate al token e all’azione richiesti, l’utilizzo riuscito invalida il token e il riutilizzo restituisce un errore senza modificare lo stato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
authentication, security
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.