Skip to content

Fix: strengthen ticket escalation validation#475

Open
Rom1-B wants to merge 2 commits into
mainfrom
fix_validation
Open

Fix: strengthen ticket escalation validation#475
Rom1-B wants to merge 2 commits into
mainfrom
fix_validation

Conversation

@Rom1-B

@Rom1-B Rom1-B commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes #N/A
  • Adds stricter input validation and access checks across the ticket escalation actions (self-assign, group climb, clone and link, escalation history, group mapping).
    These actions now consistently verify the ticket ID and the caller's rights before acting on the data.

Screenshots (if appropriate):

@Rom1-B
Rom1-B requested a review from TarekRemo July 24, 2026 08:04
Comment thread ajax/assign_me.php
$tickets_id = (int) $_REQUEST['tickets_id'];

$ticket = new Ticket();
$ticket->check($tickets_id, UPDATE);

@TarekRemo TarekRemo Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to check the Ticket::ASSIGN right instead of the UPDATE right since it's an assigning operation that is done here ?

Comment thread front/climb_group.php
$tickets_id = (int) $_REQUEST['tickets_id'];

$ticket = new Ticket();
$ticket->check($tickets_id, UPDATE);

@TarekRemo TarekRemo Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here ?

Comment thread front/ticket.form.php
if (!$ticket->canAssign()) {
throw new AccessDeniedHttpException();
}
$ticket->check($tickets_id, UPDATE);

@TarekRemo TarekRemo Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants