LabTechUDF / LabTechUDF/python-services

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

Aberta
#65 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

bug
Linguagem predominante
Python
Estrelas
0
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Nenhum arquivo-fonte, teste ou ponto de entrada é identificado na issue. Comece localizando o manipulador de tokens de ação de e-mail e seu caminho de validação; considera-se concluído quando as ações estão vinculadas ao token e à ação solicitados, o uso bem-sucedido invalida o token e a reutilização retorna um erro sem alterar o status.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
authentication, security
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.