LabTechUDF / LabTechUDF/python-services
Bug: Email action token not enforced or invalidated, allowing multiple actions on the same event
Dieses Issue hat noch niemand übernommen.
- 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:
- Trigger a status update email for an event (e.g., “Approve” / “Reject”).
- Open the email and click the provided action link.
- The event status is updated successfully.
- Reuse the same link or a different link from the same email.
- 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
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Ö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