LabTechUDF / LabTechUDF/python-services

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

Offen
#65 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
Python
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Im Issue sind keine Quelldateien, Tests oder Einstiegspunkte angegeben. Beginne damit, den Handler für E-Mail-Aktionstoken und seinen Validierungspfad zu lokalisieren; abgeschlossen ist die Aufgabe, wenn Aktionen an das angeforderte Token und die angeforderte Aktion gebunden sind, eine erfolgreiche Verwendung das Token ungültig macht und eine erneute Verwendung einen Fehler zurückgibt, ohne den Status zu ändern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
authentication, security
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.